如和判断输入为整数?

taylermail 2004-07-08 08:57:56
<script LANGUAGE="VBScript">
function f1_onsubmit()
Set theForm =f1
if theform.textfield.value ="" or not isnumeric(theform.textfield.value) then
msgbox "管径大小必须是整数!"
theform.textfield.focus()
f1_onsubmit = False
Exit Function
if theform.textfield.value<> int(theform.textfield.value) then
msgbox "管径大小必须是整数!"
end if
theform.textfield.focus()
f1_onsubmit=false
exit function
end if
End Function
</script>

当在文本框中输入12.qq 弹出消息框;当输入12.11时没进行判断,该如何改啊
...全文
80 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
junstyle 2004-07-08
  • 打赏
  • 举报
回复
isnumeric()判断一下
angelheavens 2004-07-08
  • 打赏
  • 举报
回复
http://www.blzx.net.cn/pweb/tweb/lzd/vbhs/QQExp027.html

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧