Home  >  Article  >  Web Front-end  >  js returns the page and refreshes the page data

js returns the page and refreshes the page data

不言
不言Original
2018-03-30 17:13:562292browse

Usually we control the return page using window.history.back() or window.history.go(-1). However, this way of backing up does not satisfy the refresh requirement. Data requirements.

Solution
window.location.href = document.referrer

##document.referrerNotes

==Null if the current document is not accessed via a hyperlink. ==


The above is the detailed content of js returns the page and refreshes the page data. For more information, please follow other related articles on the PHP Chinese website!

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