vb_sample.html

来自「用struts开发的多个程序源代码」· HTML 代码 · 共 24 行

HTML
24
字号
<script LANGUAGE="VBScript"> 
<!--
Sub Submit1_OnClick
	Dim TheForm
	Set TheForm = Document.forms("ValidForm")
	If IsNumeric(TheForm.Text1.Value) Then
		If TheForm.Text1.Value < 1 or TheForm.Text1.Value > 10 Then
			MsgBox "请输入一个 1 到 10 之间的数字。"
		Else
			MsgBox "谢谢。"
			TheForm.Submit	' 数据输入正确,传递到服务器。
		End If
	Else
		MsgBox "请输入一个数字。"
	End If
	Window.Event.returnValue = false
End Sub
-->
</script>
<form id="ValidForm" method="post" action="http://www.it315.org"  onsubmit=Submit1_OnClick()>
<input name="Text1" type="TEXT" SIZE="6">
<input id="Submit1" name="Submit1" type="Submit" value="Submit">
</form>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?