Home  >  Article  >  Web Front-end  >  JavaScript code to return to the previous page and refresh automatically_javascript tips

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

WBOY
WBOYOriginal
2016-05-16 16:59:201207browse

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
Statement:
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