Home > Web Front-end > JS Tutorial > body text

Multiple implementation methods of js returning to the previous page and refreshing_javascript skills

WBOY
Release: 2016-05-16 16:58:18
Original
1021 people have browsed it

Return to the previous page
Refresh the current page< ;/a>
Return to the first two pages
Return to the previous page and refresh
Return to the previous page

Page jump:

onclick="window.location.href='list.php'"

Javascript refreshes the page Several methods:

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

Methods to automatically refresh the page:
1. Automatically refresh the page: Add the following code to the area



10 means to refresh the page every 10 seconds.

2. Automatic page jump: add the following code to the area



10 fingers will jump to the http://www.baidu.com page after 10 seconds

js automatically refreshes the current page:

Copy code The code is as follows:



JS refresh frame script statement
Copy code The code is as follows:

//Refresh the page containing the frame with

(OrRefresh )

//How to refresh the page of another frame using


To refresh when closing the window or refreshing when opening the window, in
Copy the code The code is as follows:

Refresh when the window is open
Refresh when the window is closed

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template