Organize the code that you accumulated before, you can use it when you need it. The World martial arts, only fast not broken.
<!DOCTYPE HTML Public "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/TR/xhtml1/DTD/ Xhtml1-transitional.dtd "><HTMLxmlns= "http://www.w3.org/1999/xhtml"><Head><Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8" /><title>Untitled Document</title></Head><Scriptlanguage= "JavaScript"> <!--// /*This Script allows people to enter is using a form that asks for a UserID and Password*/ functionPasuser (form) {if(Form.id.value=="username") { if(Form.pass.value=="Password") { location="page2.html" } Else{alert ("Invalid Password") } } Else{alert ("Invalid UserID") } } // -</Script> <Center> <Tablebgcolor= "White"cellpadding= " a"Border= "1"> <TR><TDcolspan= "2"><Center><H1><I><b>Login Area</b></I></H1></Center></TD></TR> <TR><TD><H1><I><b>Userid:</b></I></H1></TD><TD><formname= "Login"><inputname= "id"type= "text"></TD></TR> <TR><TD><H1><I><b>Password:</b></I></H1></TD><TD><inputname= "Pass"type= "Password"></TD></TR> <TR><TD><Center><inputtype= "button"value= "Login"OnClick= "Pasuser (this.form)"></Center></TD><TD><Center><BR><inputtype= "Reset"></form></TD></TR></Table></Center><Body></Body></HTML>
An example of an HTML user name password verification module