JavaScript returns to the previous page:
1, return to the previous page history.go (-1); Returns up to two pages History.go (-2);
<a href= "Javascript:history.go (-1);" > Prev </a>
2, History.back ().
3, Window.history.forward () return to next page
4, Window.history.go (return to the first page, can also be a URL)
5, Window.location.href=url;
JS Refresh the page in several ways:
1, history.go (0);
2, window.location.href= the current page URL;
3, Location=location;
4, Location.replace (location);
5, Location.assign (location);
6, Window.navigate (location);
7, document. Url=location.href
Ways to automatically refresh pages:
1. Automatic page refresh: Add to
<meta http=-equiv= "Refresh" content= ">" 20 means refresh every 20s
2. Automatic page Jump: Add in
<meta http=-equiv= "Refresh" content= "20;url=" http:www.baidu.com "> 20 means 20s after jump to http://www.baidu.com
3, the page automatically refresh, JS
<script language= "JavaScript" > function myrefresh () { window.location.reload (); } SetTimeout (// specify 1 seconds to refresh once </script>
JS Refresh page and jump