1. Descending jump per second
Copy codeThe Code is as follows:
<Script language = javascript>
Function out (obj ){
Var I = obj;
If (I = 0)
Document. location. href = "index. jsp ";
Document. body. innerHTML = I;
I --;
SetTimeout ("out (" + I + ")", 1000 );
}
</Script>
<Body onload = "out (5);">
</Body>
2. Use the response. setHeader Function
Copy codeThe Code is as follows:
<% Response. setHeader ("Refresh", "5; URL =..."); %>
3. Use meta tags
Copy codeThe Code is as follows:
<META HTTP-EQUIV = "REFRESH" CONTENT = "2"; url = xxxx. jsp ">
JSP page for automatic jump!
1. automatic page Refresh:
Add the following code to the Copy codeThe Code is as follows:
<Meta http-equiv = "refresh" content = "5">
Note: content = "5" is a time control, indicating that the page is refreshed every 5 seconds.
Ii. automatic page Jump:
Add the following code to the Copy codeThe Code is as follows:
<Meta http-equiv = "refresh" content = "1; url = index. jsp">
Note: content = "1 is the time control, indicating that the page to jump is automatically redirected in 1 second.
Content = "0" indicates that the page will jump to the page you want to jump to immediately.
Url = index. jsp is the page to jump