<!doctype HTML Public "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/ Xhtml1-transitional.dtd ""
< Meta http-equiv= "Content-type" content= "text/html;" charset=gb2312 "/>
<script language= "JavaScript Tutorial" >
Password
var Tmp=document.regform.u_password.value;
if (Tmp.length < 6) {
Alert ("Hint: password length must be greater than 6");
Document.regform.u_password.focus ();
return false;
}
if (Tmp.length <6) {//&&/^d+$/.test (TMP)
Alert (hint: password is too simple, set a combination of letters, numbers, or symbols.) ");
Document.regform.u_password.focus ();
return false;
}
if (Document.regform.u_password2.value!= document.regform.u_password.value) {
Alert ("Hint: two times password inconsistency");
Document.regform.u_password2.focus ();
return false;
}
</script>
<body>
<form id= "Form1" Name= "RegForm" method= "POST" action= "" >
<label>
Enter Password:
<input type= "Password" name= "U_password"/>
Confirm Password:
<input type= "Password" name= "U_password2"/>
</label>
<label>
<input type= "Submit" name= "Submit" value= "Validation" onclick= "Checkpass ();" />
</label>
</form>
</body>