<html>
<head>
<title>JS判断是否允许输入数字,禁止其它特殊字符_www.jb200.com</title>
<script type="text/
javascript">
function check(e){
var keynum
if(window.event){
keynum = e.keyCode;
}
else if(e.which){
keynum = e.which;
}
if ((keynum>32&&keynum<48)||(keynum>57&&keynum<65)||(keynum>90&&keynum<97)||keynum==34||keynum==39||keynum==60||keynum==62){alert('请不要使用特殊字符');event.returnValue = false;}
}
</script>
</head>
<body>
<textarea rows=2 cols=20 name=comments
onKeypress="return check(event);"></textarea>
</body>
</html>