要怎么限制呢
回复讨论(解决方案)
document.getElementById('demo').onchange = function() { if (!/^[01]+$/.test(this.value)) { alert('非法字符'); this.value = ''; }}
查看更多关于怎么用正则表达式限制text框的输入_html/css_WEB-ITnose的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did104432