Home>Article>Web Front-end> How to refresh the page in JavaScript
Methods for refreshing the page in JavaScript: 1. Refresh the current document through the reload() method; 2. Replace the current document with a new document through the replace() method.
The operating environment of this article: windows7 system, javascript version 1.8.5, Dell G3 computer.
How to refresh the page in JavaScript?
js Refresh the current page
js Refresh the current page method:
Method 1: reload() method
## The #reload() method is used to refresh the current document. The reload() method is similar to the refresh page button on your browser.location.reload();Method 2: replace() method replace() method can replace the current document with a new document. .
Recommended study: "菜鸟教程(runoob.com)
javascript Advanced Tutorial"
The above is the detailed content of How to refresh the page in JavaScript. For more information, please follow other related articles on the PHP Chinese website!