CopyCodeThe Code is as follows: // the user name is not empty for verification.
Function checkusername (){
VaR name = document.myform.txt user; // here I think: name represents the text box of txtuser
If (name. value. Length = 0 ){
Alert ("Enter the user name ");
Name. Focus ();
Return false;
} Else {return true ;}
}
// Non-empty password verification + Validation
Function checkpass (){
VaR passmediadocument.myform.txt pass;
VaR rpass#document.myform.txt rpass;
If (Pass. value = ""){
Alert ("the password cannot be blank ");
Pass. Focus ();
Return false;
} Else if (Pass. value. Length <4 | pass. value. length> 16 ){
Alert ("the password must be 4-16 characters long ");
Pass. Select ();
Return false;
} Else if (rpass. value! = Pass. Value ){
Alert ("confirming that the password is inconsistent with the password ");
Rpass. Select ();
Return false;
} Else {return true ;}
}