When the user enters the PWD password is123Jump to the secondPage, automatically jump to the third page in 4 seconds
Login.html
<HTML> // Check Function Check (){ // Window. Alert ($ ("username"). value ); If ($ ("Username"). value = "PWD" & $ ("PWD"). value = "123" ){ Return True ;} Else {$ ( "Username"). value = "" ; $ ( "PWD"). value = "" ; Return False ;}} // Get Document Object Function $ (ID ){ Return Document. getelementbyid (ID );} </SCRIPT> U: <Input type = "text" id = "username"/> <br/> P: <Input type = "password" id = "PWD"/> <br/> <input type = "Submit" value = "Submit" onclick = "Return check () "/> </form> </body>
OK .html
<HTML> // Jump to the specified page Function Tiao () {clearinterval (myinterval); window. Open ( "Success.html", "_ Self" );} // Set 5-second redirect SetTimeout ("Tiao ()", 5000 ); // Change seconds Function Changesec (){ // Change number $ ("Myspan"). innertext = parseint ($ ("myspan"). innertext)-1 ;} VaR Myinterval = setinterval ("changesec ()", 1000 ); // Get object Function $ (ID ){ Return Document. getelementbyid (ID );} </SCRIPT> Logon successful <Span id = "myspan"> 5 </span> seconds later </body>
Success.html
<HTML> Welcome .......</Body>