<html>
<script>
function checkI()
{
var p = /[^\!\\,]/g;
var s = document.getElementById("iiii").value;
if (!p.test(s))
{
alert("OK,");
} else {
alert("NO");
}
}
</script>
<body>
<br>
 input : <input type="text" id="iiii" onKeyDown="if (event.keyCode==13)checkI();"></body>
</html>请问楼上的。不好用丫。。拜托再帮忙看看呗。