Home Web Front-end JS Tutorial Multiple implementation methods of js returning to the previous page and refreshing_javascript skills

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

May 16, 2016 pm 04:58 PM
refresh go back to the last page

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

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

6 Ways to Refresh Web Pages on iPhone 6 Ways to Refresh Web Pages on iPhone Feb 05, 2024 pm 02:00 PM

When you browse the web on your iPhone, the loaded content is temporarily stored as long as the browser app remains open. However, the website updates content regularly, so refreshing the page is an effective way to clear out old data and see the latest published content. This way, you always have the latest information and experiences. If you want to refresh the page on iPhone, the following post will explain you all the methods. How to Refresh Web Pages on Safari [4 Methods] There are several methods to refresh the pages you are viewing on the Safari App on iPhone. Method 1: Use the Refresh Button The easiest way to refresh a page you have open on Safari is to use the Refresh option on your browser's tab bar. If Safa

F5 refresh key not working in Windows 11 F5 refresh key not working in Windows 11 Mar 14, 2024 pm 01:01 PM

Is the F5 key not working properly on your Windows 11/10 PC? The F5 key is typically used to refresh the desktop or explorer or reload a web page. However, some of our readers have reported that the F5 key is refreshing their computers and not working properly. How to enable F5 refresh in Windows 11? To refresh your Windows PC, just press the F5 key. On some laptops or desktops, you may need to press the Fn+F5 key combination to complete the refresh operation. Why doesn't F5 refresh work? If pressing the F5 key fails to refresh your computer or you are experiencing issues on Windows 11/10, it may be due to the function keys being locked. Other potential causes include the keyboard or F5 key

Simple steps to return to the previous page home in oppo mobile phone Simple steps to return to the previous page home in oppo mobile phone Mar 25, 2024 pm 08:26 PM

1. When using gesture navigation, we can return to the previous page by swiping up from the bottom right edge of the screen. 2. When using the three-key navigation on the screen, click the triangle return key to return to the previous page. 3. When using floating navigation, click the floating ball to return to the previous page.

How to quickly refresh a web page? How to quickly refresh a web page? Feb 18, 2024 pm 01:14 PM

Page refresh is very common in our daily network use. When we visit a web page, we sometimes encounter some problems, such as the web page not loading or displaying abnormally, etc. At this time, we usually choose to refresh the page to solve the problem, so how to refresh the page quickly? Let’s discuss the shortcut keys for page refresh. The page refresh shortcut key is a method to quickly refresh the current web page through keyboard operations. In different operating systems and browsers, the shortcut keys for page refresh may be different. Below we use the common W

Detailed explanation of the return to previous page operation in Quark Browser Detailed explanation of the return to previous page operation in Quark Browser Jan 30, 2024 pm 05:48 PM

How to return to the previous page in Quark Browser? Quark Browser is a browser software that is very simple to use and easy to use. It has many convenient functional designs, which can bring us Internet services with twice the result with half the effort. When you use Quark Browser to surf the Internet, you can set the quick return method to get a quick service to quickly return to the previous access interface. If you don't know how to operate it specifically, follow the editor to take a look at how to quickly return to the previous page in Quark browser settings. How to return to the previous page in Quark Browser 1. Open Quark Browser software on your mobile phone. 2. Go to the homepage of Quark Browser and click the [Three Stripes] at the bottom. 3. Go to the personal homepage and click [Settings]. 4. On the settings page, click [Display and Style]. 5. Enter

What should I do if the value disappears after the react page is refreshed? What should I do if the value disappears after the react page is refreshed? Dec 29, 2022 am 11:11 AM

The solution to the value disappearing after the react page is refreshed: 1. Refresh the page and check whether the data in the state will be cleared; 2. Use the "const name = location.query.name; const id = location.query.id;" method By adding parameters to the jump link, you can pass the parameters and refresh the page without losing the data.

What is the keyboard refresh shortcut key? What is the keyboard refresh shortcut key? Feb 25, 2024 pm 10:38 PM

What is the keyboard refresh shortcut key? With the development of computer technology, the keyboard has become an indispensable device in our daily work and life. The function of the keyboard goes far beyond entering text. It is also often used to operate various functions of the computer and improve our work efficiency. The keyboard shortcuts allow us to complete various operations more quickly and conveniently. In the daily use of computers, we often encounter situations where we need to refresh the page. When we open a web page or run software, sometimes the page will freeze or fail to load. At this time, refresh the page.

What should I do if the Win10 desktop refreshes infinitely when I start it? Solution to infinite refresh of Win10 startup desktop What should I do if the Win10 desktop refreshes infinitely when I start it? Solution to infinite refresh of Win10 startup desktop Jul 08, 2023 am 09:33 AM

Recently, when some users were using the Win10 system, they found that sometimes the desktop would be automatically refreshed without stopping, and it would also refresh while we were watching videos and listening to music, which greatly affected the user experience. So What to do when the computer is turned on and the wireless network is refreshed? The editor below will tell you how to deal with the infinite refresh of the Win10 desktop when it is turned on. What should I do if the computer is turned on and the wireless network is refreshed? 1. After we enter the desktop, click the menu bar icon with the mouse. 2. Select [Resource Manager] in the opened interface. 3. After entering the page, click [Windows Task Manager] and select [End Task]. 4. After proceeding, return to the desktop and right-click the mouse to select the menu bar. 5. At this time, everyone clicks [luck]

See all articles