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

JavaScript code to return to the previous page and refresh automatically_javascript tips

WBOY
Release: 2016-05-16 16:59:20
Original
1211 people have browsed it

Use JavaScript to generally use history.go(-1) and history.back(), etc.

But the page or the data in the cache is returned, and the updated data cannot be presented immediately

Here Just use a simple javascript statement to implement it, return to the previous page and refresh the page

Copy the code The code is as follows:

location.href = document.referrer;//Reload the previous page
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