标签:dex amp this character inpu puts rip 特殊 type
<input type="text" id="inputs" onblur="filtecharacter(this, 0)">
</body>
<script>
var _arr=new Array();
_arr[0]=/[\`\~\!\@\#\$\%\^\&\*\+\\\]\}\{\‘\;\:\"\/\.\,\\。\>\<\s\|\=\-\?]/g;
_arr[1]=/[^\d]/g;
//屏蔽输入的特殊字符
function filtecharacter(obj, index) {
obj.value = obj.value.replace(_arr[index], "");
}
var btns = document.getElementById(inputs);
</script>
标签:dex amp this character inpu puts rip 特殊 type
原文地址:https://www.cnblogs.com/qq735675958/p/9164992.html