<a href= "Javascript:history.go ( -1)" > Return to Previous page </a>
<a href= "Javascript:location.reload ()" > Refresh current page </a>
<a href= "javascript: onclick=" History.go (-2); "> Return to the first two pages </a>
<a href= "javascript:" onclick= "self.location=document.referrer;" > Go back to the previous page and refresh </a>
<a href= "javascript: onclick=" History.back (); "> Back to Previous page </a>
Page Jump:
onclick= "window.location.href= ' list.php '"
JavaScript refreshes the page in several ways:
1,history.go (0)
2,location.reload ()
3,location=location
4,location.assign (location)
5,document.execcommand (' Refresh ')
6,window.navigate (location)
7,location.replace (location)
8,document. Url=location.href
Ways to automatically refresh pages:
1. Page Automatic refresh: Add the following code to the
<meta http-equiv= "Refresh" content= "ten" >
10 means to refresh the page every 10 seconds.
2. Page Automatic Jump: Add the following code to the
<meta http-equiv= "Refresh" content= "10;url=http://www.baidu.com" >
10 point to 10 seconds to jump to http://www.baidu.com page
JS automatically refreshes the current page:
Copy Code code as follows:
<script language= "JavaScript" >
function Myrefresh ()
{
Window.location.reload ();
}
SetTimeout (' Myrefresh () ', 1000); Specify 1 seconds to refresh once
</script>
JS Refresh Frame Script statement
Copy Code code as follows:
Refresh the page that contains the frame with
<script language=javascript>
Parent.location.reload ();
</script>
child window refreshes parent window
<script language=javascript>
Self.opener.location.reload ();
</script>
(or <a href= "javascript:opener.location.reload ()" > Refresh </a>)
How to refresh another frame's page with
<script language=javascript>
Parent. Another FrameID.location.reload ();
</script>
To refresh or open windows when you close the window, call the following statement in <body>:
Copy Code code as follows:
<body onload= "Opener.location.reload ()" > Refresh when opening windows
<body onunload= "Opener.location.reload ()" > Refresh when closed
<script language= "JavaScript" >
Window.opener.document.location.reload ()
</script>