How to refresh the page with javascript:
1 history. Go (0)
2 location. Reload ()
3 location = Location
4 location. Assign (location)
5 document.exe ccommand ('refresh ')
6 window. navigate (location)
7 location. Replace (location)
8 Document. url = location. href
How to automatically refresh the page:
1. Automatically refresh the page:CodeJoining the
<Meta http-equiv = "refresh" content = "20">
20 indicates refreshing the page every 20 seconds.
2. automatic page Jump: Add the following code to the
<Meta http-equiv = "refresh" content = "20; url = http://www.wyxg.com">
20 means jump to the http://www.wyxg.com page every 20 seconds
3. Automatically refresh JS version on the page
<Script language = "JavaScript">
Function myrefresh ()
{
Window. Location. Reload ();
}
SetTimeout ('myrefresh () ', 1000); // refresh once per second
</SCRIPT>
JS refresh framework script statement
// How to refresh the page containing the framework
<Script language = JavaScript>
Parent. Location. Reload ();
</SCRIPT>
// Refresh the parent window in the Child Window
<Script language = JavaScript>
Self. opener. Location. Reload ();
</SCRIPT>
(Or <a href = "javascript: opener. Location. Reload ()"> refresh </a>)
// How to refresh the page of another framework
<Script language = JavaScript>
Parent. Another frameid. Location. Reload ();
</SCRIPT>
If you want to refresh the window when closing the window or refresh the window when opening the window, you can call the following statement in <body>.
<Body onload = "opener. Location. Reload ()"> refresh when opening a window
<Body onUnload = "opener. Location. Reload ()"> refresh when disabled
<Script language = "JavaScript">
Zookeeper opener.doc ument. Location. Reload ()
If you do not want to bring up a prompt during refresh, you can use:
Window. Location. href = Window. Location. href;
Window. Location. Reload;
But window. location. href = "page to refresh", there is no problem in IE7, it won't work in IE6 and traveling, and window. location. reload ().
<JS basics> -- refresh the page with JavaScript
1. response. Write ("<script language = JavaScript> parent.left.doc ument. Location. Reload (); </SCRIPT> ");
2. response. Write ("<SCRIPT> window. Top. Location = 'login. aspx '; window. Close </SCRIPT> ");
3. this. registerstartupscript ("reload", "<SCRIPT> window. parent. frames ('left '). location. reload (true); </SCRIPT> "); or this. registerstartupscript ("reload", "<SCRIPT> window. parent. frames ('left '). location. href = Window. parent. frames ('left '). location. href; </SCRIPT> ");