Examples of
Javascript refreshing the page Several methods of Javascript refreshing the page:
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= "20">
Where 20 refers to refreshing the page every 20 seconds.
2. The page automatically jumps: add the following code to the <head> area
<meta http-equiv="refresh" content="20;url=http:/ /www.wyxg.com">20
means jump to http://www.wyxg.com page after 20 seconds
3. The page automatically refreshes the js version
<mce:script language="JavaScript">
<!-- function myrefresh() {
window.location.reload(); }
setTimeout('myrefresh()',1000); //Specify to refresh once every second
// -->
</mce:script>
If you have any questions, please leave a message or go to the community on this site to discuss , Thank you for reading, I hope it can help everyone, thank you for your support to this site!
Original link: http://blog.csdn.net/yplee_8/article/details/51967329
Example of Javascript refreshing the page
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=326511443&siteId=291194637
Recommended
Ranking