IsNumeric是vb脚本要这样写 <script language="vbscript"> function add() if not IsNumeric(document.AddNew.Person.value) msgbox("招聘人数请输入数字!") document.AddNew.Person.focus() else add=true end if end function </script>
<script language=vbscript>
sub add
if not IsNumeric(document.AddNew.Person.value) then
msgbox("招聘人数请输入数字!")
document.AddNew.Person.value=""
document.AddNew.Person.focus()
end if
end sub
</script>
<form action= name=AddNew method=post>
招聘人数:<input type="text" name="Person" onKeyUp="add">
<input type="submit" name="Submit" value="提交">
</form>