Home > Article > Web Front-end > js returns the page and refreshes the page data
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
Notes
==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!