<a href="javascript:history.go(-1)">Return to previous page</a>
<a href="javascript:location.reload()">Refresh the current page</a>
<a href="javascript:" onclick="history.go(-2); ">Return to the previous two pages</a>
<a href="javascript:" onclick="self.location=document.referrer;">Return to the previous page and refresh</a>
<a href="javascript:" onclick="history.back(); ">Return to previous page</a>
Page jump:
onclick="window.location.href='list.php'"
Several ways to refresh a page in Javascript:
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
How to automatically refresh the page:
1. Automatic page refresh: add the following code to the <head> area
<meta http-equiv="refresh" content="10">
10 means refreshing the page every 10 seconds.
2. Automatic page jump: add the following code to the <head> area
<meta http-equiv="refresh" content="10;url=http://www.baidu.com">
10 fingers jump to http://www.baidu.com page after 10 seconds
js automatically refreshes the current page:
The code copy is as follows:
<script language="JavaScript">
function myrefresh()
{
window.location.reload();
}
setTimeout('myrefresh()',1000); //Specify refresh once in 1 second
</script>
JS refresh framework script statement
The code copy is as follows:
//Refresh the page containing the frame for
<script language=JavaScript>
parent.location.reload();
</script>
//The child window refreshes the 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
<script language=JavaScript>
parent.another FrameID.location.reload();
</script>
To refresh when closing a window or refresh when opening a window, call the following statement in <body>:
The code copy is as follows:
<body onload="opener.location.reload()"> Refresh when opening the window
<body onUnload="opener.location.reload()"> Refresh when closed
<script language="javascript">
window.opener.document.location.reload()
</script>