[CODE]<html>
<head>
<title>数字限制</title>
<script language="vbscript">
function BtnA_Click()
On Error Resume Next
Dim Tst
Tst=document.all("TxtA").value'获得输入的数据
IF VarType(CInt(Tst))<>2 Then
MsgBox "只能输入数字"
End IF
end function
</script>
</head>
<body>
<input type="text" name="TxtA" >
<input type="button" name="BtnA" value="提交" onClick="BtnA_Click()" >
</body>
</html>[/CODE]