After successful login, the system automatically calculates the number of seconds for jump.

Source: Internet
Author: User

Login.html
Copy codeThe Code is as follows:
<Script language = "javascript" type = "text/javascript">
Function $ (id ){
Return document. getElementById (id );
}

Function checkUser (){
If ($ ("u1"). value = "hello" & $ ("p1"). value = "123 "){
Return true;
} Else {
Return false;
}
}
</Script>
<Form action = "OK .html">
<Div style = "width: 300px; height: 200px; border: 1px solid red; background-color: pink">
<P/>
U: <input id = "u1" type = "text" value = "/> <br>
P: <input id = "p1" type = "text" value = ""/> <br>
<Input type = "submit" onclick = "return checkUser ()" value = "login" style = "margin-left: 20px"/>
</Div>
</Form>

OK .html
Copy codeThe Code is as follows:
<Script language = "javascript" type = "text/javascript">
SetTimeout ("javascript: clearinterval(mytime={{open('manage.html ')", 5000 );
Function changeSec (){
Document. getElementById ("myspan"). innerText =
ParseInt (document. getElementById ("myspan"). innerText)-1;
}
Var mytime = setInterval ("changeSec ()", 1000 );
</Script>
<Span id = "myspan"> 5 </span> seconds after successful login...

Manage.html
Copy codeThe Code is as follows:
Welcome
 
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.