在页面中做一个Javascript脚本去检测了,可以用函数IsNumeric()实现:
<html>
<head>
<script language="vbscript">
sub checkinput()
if not IsNumeric(test.id.value) then
alert "请输入数字"
test.id.select
test.id.focus
end if
end sub
</script>
</head>
<body>
<form name="test">
<input type="text" name="id" onchange="checkinput():">
</form>
</body>
</html>