我在VB.NET里建了一个网页,用了ONKEYPRESS,运行后没反应,请DX帮忙看看,写的JS如下:
<html>
<head>
<script language=javascript>
function check(e)
{
if((e.keycode>9)|| (e.keycode<0))
alert("input data")
}
</script>
</head>
<BODY>
<P><FONT face="MS UI Gothic"><INPUT id="Text1" type="text" name="Text1" onkeypress="check(event)"></FONT></P>
</BODY>
</html>
<html>
<head>
<script language=javascript>
function check(e)
{
if((e.keycode>9)|| (e.keycode<0))
alert("input data")
}
</script>
</head>
<BODY>
<P><FONT face="MS UI Gothic"><INPUT id="Text1" type="text" name="Text1" onkeypress="check(event)"></FONT></P>
</BODY>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货