Summary of the relevant JS refresh page compiled by Wulin.com: //www.VeVB.COM/article/139788.htm
1.js code:
<SCRIPT LANGUAGE="JavaScript">var time = 5; //Time, seconds var timelong = 0;function displaytime(){ //Time decrement document.all.his.innerHTML = time -timelong ;timelong ++;}function redirect(){ //Jump page//history.back();window.location.href="Category-list";//Specify the target page to jump to}timer=setInterval('diplaytime()', 1000);//Show time timer=setTimeout('redirect()', time * 1000); //Jump</SCRIPT>2. Page Quote:
<DIV ALIGN="CENTER" style="font-size:15;color:threeddarkshadow;" >If you do not perform any operation, the system will automatically return after 5 seconds! </DIV><DIV ALIGN="CENTER" style="font-size:15;color:threeddarkshadow;" id="his">It will automatically return after 5 seconds....</DIV>
Javascript/js Automatic page refresh and page jump implementation method
1)
<meta http-equiv="refresh"content="10;url=Redirected page">
10 means refreshing once every 10 seconds apart
2)
<script language=''javascript''>window.location.reload(true);</script>
If you want to refresh an iframe, change window to frame's name or ID number
3)
<script language=''javascript''>window.navigate("url of this page");</script>4>
function abc(){window.location.href="/blog/window.location.href";setTimeout("abc()",10000);}Refresh this page:
Response.Write("<script language=javascript>window.location.href=window.location.href;</script>")Refresh the parent page:
Response.Write("<script language=javascript>opener.location.href=opener.location.href;</script>")Go to the specified page:
Response.Write("<script language=javascript>window.location.href='yourpage.aspx';</script>")Summary of implementation methods for refreshing pages (HTML, ASP, JS)'by aloxy
Timely refresh:
1,
<script>setTimeout("location.href='url'",2000)</script>Note: url is the URL address of the page to be refreshed
2000 is waiting time = 2 seconds,
2. <meta name="Refresh" content="n;url">
illustrate:
n is the number of seconds to wait before loading the specified URL.
url is an absolute URL to be loaded.
n, is the waiting time, in seconds
URL is the URL address of the page to be refreshed
3. <%response.redirect url%>
Note: Generally, a url parameter or form pass value is used to determine whether an operation has occurred, and then refresh using response.redirect.
4. Refresh the frame page
〈script language=javascript>top.leftFrm.location.reload();parent.frmTop.location.reload();</script>
The problem of refreshing after the form pops up
Response.Write("<script>window.showModalDialog('../OA/SPCL.aspx',window,'dialogHeight: 300px; dialogWidth: 427px; dialogTop: 200px; dialogLeft: 133px')</script>");//openResponse.Write("<script>document.location=document.location;</script>");Add <base target="_self"/> to the subform page code head
Add the refreshed content to if (!IsPostBack) and refresh the left side in the frame page.
//Refresh the left half of the frame page Response.Write("<script language=javascript>");Response.Write("parent.left.location.href='PayDetailManage_Left.aspx'");Response.Write("</script>");Response.Write("</script>");Implementation of page timing refresh function
There are three ways:
1. Set in html:
After <title>xxxxx</title>, just add the following line!
Timed refresh: <META HTTP-EQUIV="Refresh" content="10">
10 represents refresh interval, unit is seconds
2.jsp
<% response.setHeader("refresh","1"); %>
Refresh once every second
3. Use javascript.:
<script language="javascript">setTimeout("self.location.reload();",1000);<script>Once a second
The page will jump automatically:
1. Set in html:
After <title>xxxxx</title>, just add the following line!
Jump and refresh regularly: <meta http-equiv="refresh" content="20;url=http://home URL">, where 20 fingers jump to http://home URL after 20 seconds
page.
Click the button to submit the form and refresh the upper window
Window A opens window B
Then submit the data in B to window C