Asp.net中Scrip请教!
<head runat="server">
<title>验证演示</title>
<script language="vbscript">
<!--
Sub Validate()
If IsNumeric(form1.Text1.Value)then
IF form1.Text1.Value >= 0 or form1.Text1.Value <= 100
Then
Msgbox "请输入一个0到100的数字"
Else
msgbox "输入正确"
End if
Else
Msgbox "请输入一个数字"
Endif
End Sub
-->
</script>
</head>
<body>
<form id="form1" action="Default.aspx" onsubmit="Validate()" >
<input name="Text1" id="Text1" type="text" />
<input name="Submit" id="Submit1" type="submit" value="submit" /> </form>
</body>
问题补充:无法检测数据,没有弹出对话框 ,哪里出了问题?
<head runat="server">
<title>验证演示</title>
<script language="vbscript">
<!--
Sub Validate()
If IsNumeric(form1.Text1.Value)then
IF form1.Text1.Value >= 0 or form1.Text1.Value <= 100
Then
Msgbox "请输入一个0到100的数字"
Else
msgbox "输入正确"
End if
Else
Msgbox "请输入一个数字"
Endif
End Sub
-->
</script>
</head>
<body>
<form id="form1" action="Default.aspx" onsubmit="Validate()" >
<input name="Text1" id="Text1" type="text" />
<input name="Submit" id="Submit1" type="submit" value="submit" /> </form>
</body>
问题补充:无法检测数据,没有弹出对话框 ,哪里出了问题?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货