Simple if: vNum1 = InputBox ("Enter First
Number","Windows Office 2007")
<html> If vNum1 = "" Then
<body> MsgBox ("You didn't enter anything!")
<script language="vbscript"> Else
Dim a vNum2 = InputBox ("Enter Second
a = 60 Number","Windows Office 2007")
Dim b : b = 40 vTotal = cint(vNum1)+cint(vNum2)
If a > b then MsgBox "You entered " & vNum1 & " and
[Link] "a is Greater than b" " & vNum2 & " which totals " &
else vTotal,,"Well done!"
[Link] "B is bigger" [Link]("Sum of two
End If numbers:"&vTotal)
</script> End If
</body> </script>
</html> </body>
</html>
Simple if with build function
Client Side Script
<html>
<body> <html>
<script language="vbscript"> <head>
Dim num <title>Login form validation</title>
num=inputbox("Enter a number") <script language="vbscript">
sub validate()
if num mod 2=0 then
Dim a
msgbox "You entered an even
Dim b
number" a=[Link]
else b=[Link]
msgbox "You entered an Odd if a="y" and b="u" then
number" msgbox "Login success"
end if else
</script> msgbox "Login Failed.....Try Again"
</body> end if
</html> end sub
</script>
</head>
IF statement with Msgbox and user <body>
input values <p align="center">
<h1>Login Form</h1>
<html> <br>
<body> <form name="f1">
<script language="vbscript"> Login Id<input type="text" name="txtlogin">
Dim vNum1,vNUm2,vTotal <br>
Password<input type="password"
name="txtpw">
1
<br> <input type="reset">
<input type="button" name="cmdlogin" </body>
value="login" onclick="validate()"> </html>
<input type="reset">
</body>
</html>
Creating and storing cookies:
<html>
<head>
<title>Login form validation</title>
<script language="vbscript">
sub validate()
Dim a,b
a=[Link]
b=[Link]
If [Link]="" Then
msgbox "Enter some value!"
elseif a="y" and b="u" then
msgbox "Login success"
cookievalue=([Link])
[Link]="name=" +
cookievalue
msgbox "Setting Cookies : " &
"name=" & cookievalue
else
msgbox "Login Failed.....Try
Again"
End If
end sub
</script>
</head>
<body>
<p align="center">
<h1>Login Form</h1>
<br>
<form name="f1">
Login Id<input type="text" name="txtlogin">
<br>
Password<input type="password"
name="txtpw">
<br>
<input type="button" name="cmdlogin"
value="login" onclick="validate()">