<html> <head> <title>event clicking</title> <script language="javascript"> function passwordCheck() { var pw=ole.pw.value; var cpw=ole.cpw.value; if(pw!=cpw) window.alert("Re-enter your password"); else window.alert("ur password is matched"); } </script></head> <center> <body font size=5 bgcolor="cyan" leftmargin=120 topmargin=120 > <Form id="ole" onSubmit="passwordCheck(this)" > PASSWORD: <input type=password name="pw"size=10 max length=8 > </input> <br><br><br> CONFIRM PASSWORD <input type=password name="cpw"size=10 max length=8 > </input> <br><br><br> <input type="submit" name="sub" value="submit"> <input type="reset" name="rt" value="reset"></center </body> </html>