How to refresh the current page and retrieve data by js
This article introduces the knowledge of "how to refresh the current page and retrieve data from js". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
1. Reload () method
Force the browser to refresh the current page and reload the current document to get the data.
II. Grammar
Location.reload (forcedReload)
III. Parameters
ForcedReload: required to be Boolean
1. When the value is true, the browser is forced to retrieve the current page resource from the server instead of reading it from the browser's cache
2. When the value is false or the parameter is not passed, the browser may read the current page from the cache.
Fourth, use the reload () method to refresh the current page and retrieve the data
Function myrefresh () {_ window.location.reload ();} setTimeout ('myrefresh ()', 1000); / / specify an one-second refresh of "how js refreshes the current page to retrieve data". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!