标签:html js 输入框
<html> <body> <script type="text/javascript"> function noNumbers(e) { var keynum var keychar var numcheck if(window.event) // IE { keynum = e.keyCode } else if(e.which) // Netscape/Firefox/Opera { keynum = e.which } keychar = String.fromCharCode(keynum) numcheck = /\d/ return !numcheck.test(keychar) } </script> <form> <input type="text" onkeypress="return noNumbers(event)" /> </form> </html>
本文出自 “没有水勒鱼” 博客,请务必保留此出处http://javaqun.blog.51cto.com/10687700/1704208
标签:html js 输入框
原文地址:http://javaqun.blog.51cto.com/10687700/1704208