質問編集履歴
2
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -50,21 +50,35 @@
|
|
50
50
|
|
51
51
|
$(function(){
|
52
52
|
|
53
|
-
$("#password
|
53
|
+
$("#password").change(function(){
|
54
54
|
|
55
55
|
var str = $(this).val();
|
56
56
|
|
57
|
-
str = str.replace( /[A-Za-z0-9-!”#$%&’()=<>,.?_[]{}@^~¥]/g,
|
57
|
+
str = str.replace( /[A-Za-z0-9-!”#$%&’()=<>,.?_[]{}@^~¥]/g, function(s) {
|
58
58
|
|
59
59
|
return String.fromCharCode(s.charCodeAt(0) - 65248);
|
60
60
|
|
61
61
|
});
|
62
62
|
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
var str=" ABC 123 ";
|
68
|
+
|
69
|
+
var reg=new RegExp("[A-Za-z0-9-!”#$%&’()=<>,.?_[]{}@^~¥]","g");
|
70
|
+
|
71
|
+
var replacement=function(s) {return String.fromCharCode(s.charCodeAt(0) - 65248)};
|
72
|
+
|
73
|
+
str = str.replace(reg, replacement).replace(/\s/g,'');
|
74
|
+
|
63
|
-
|
75
|
+
console.log(str);
|
64
76
|
|
65
77
|
}).change();
|
66
78
|
|
67
79
|
});
|
80
|
+
|
81
|
+
|
68
82
|
|
69
83
|
|
70
84
|
|
1
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -78,4 +78,4 @@
|
|
78
78
|
|
79
79
|
###質問点
|
80
80
|
|
81
|
-
上記コードの修正点を教え
|
81
|
+
上記コードの修正点をお教えくださいませ
|