01.
<html>
02.
<head>
03.
<title>ThaiCreate.Com Tutorial</title>
04.
</head>
05.
<body>
06.
<script language=
"VBScript"
>
07.
Function
btnSubmit_OnClick()
08.
If
Document.form1.txt1.value =
""
Then
09.
Msgbox(
"Please input Input 1"
)
10.
Document.form1.txt1.focus()
11.
Exit
Function
12.
End
IF
13.
If
Document.form1.txt2.value =
""
Then
14.
Msgbox(
"Please input Input 2"
)
15.
Document.form1.txt2.focus()
16.
Exit
Function
17.
End
IF
18.
Document.form1.submit()
19.
End
Function
20.
</script>
21.
<form action=
"page.cgi"
method=
"post"
name=
"form1"
>
22.
Input 1 <input name=
"txt1"
type=
"text"
><br>
23.
Input 2 <input name=
"txt2"
type=
"text"
><br>
24.
<input name=
"btnSubmit"
type=
"button"
value=
"Submit"
>
25.
</form>
26.
</body>
27.
</html>