<html>
<head>
<title>A Simple Page</title>
<script language="JavaScript">
function sendMe()
{
return confirm("Continue?");
}
function chkForm()
{
if (form1.pass1.value != form1.pass2.value)
{
alert("Password does not match");
form1.pass1.value = "";
form1.pass2.value = "";
form1.pass1.focus();
return false;
}
}
</script>
</head>
<body>
<form name="form1" method="POST" action="someCGI.cgi" onSubmit="return sendMe()">
<p>Enter you password: <input type="password" name="pass1"><br>
Re-enter you password: <input type="password" name="pass2"><br>
<input type="submit" value="Submit" onClick="return chkForm()">
<input type="reset" value="Reset"></p>
</form>
</body>
</html>
|