- <script type="text/javascript"> function check(){ str = a.value var pattern = /\d{6}/; alert(pattern.test(str)); } </script>
- <input id="a" name="a" type="text" value="455555"/><input type="button" value="检查" onclick="check();"/>
服务器之家 > 正文
- <script type="text/javascript"> function check(){ str = a.value var pattern = /\d{6}/; alert(pattern.test(str)); } </script>
- <input id="a" name="a" type="text" value="455555"/><input type="button" value="检查" onclick="check();"/>