Home > Web Front-end > JS Tutorial > javascript force refresh page implementation code_javascript skills

javascript force refresh page implementation code_javascript skills

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-16 18:39:22
Original
1204 people have browsed it

Several methods for Javascript to refresh 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

Method to automatically refresh the page:
1. The page automatically refreshes: add the following code to the area

The 20 refers to refreshing every 20 seconds Page.

2. The page automatically jumps: add the following code to the area

The 20 fingers will jump to the http://www.jb51.net page after 20 seconds

3. The page automatically refreshes the js version

Copy code The code is as follows:



How ASP.NET outputs the refresh parent window script statement
1. this.response.write("<script>opener.location.reload();</script>");
2. this.response.write("<script>opener.window.location.href = opener.window.location.href;</script>");
3. Response.Write("")

JS refresh frame script statement
//How to refresh the content The page of this frame uses


//The child window refreshes the parent window

( or )

//How to refresh the page of another frame using


If you want to refresh when the window is closed or you want to refresh when the window is opened, just call the following statement in .

Refresh when opening the window
Refresh when closing



//Jump out of the page
< ;SCRIPT LANGUAGE=JAVASCRIPT>
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
Latest Issues
What are JavaScript hook functions?
From 1970-01-01 08:00:00
0
0
0
What is JavaScript garbage collection?
From 1970-01-01 08:00:00
0
0
0
c++ calls javascript
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template