Home >Web Front-end >JS Tutorial >Several ways to reload the current page or parent page using JS

Several ways to reload the current page or parent page using JS

高洛峰
高洛峰Original
2016-12-03 14:36:522052browse

During the development process, I want to refresh a fixed page at a certain time to update the properties of some controls on the page, such as display, hiding, clickability, etc.

is mainly used to refresh the page. The

method is as follows:

Method 1:

                                                                                                                                                                                                         with ion. replace("NEW_URL");

Method 3:

                                                                                                                      use   with           through    through  ‐ ‐ ‐replace("NEW_URL"); If you use JS to load a fixed format page at a certain time, this cannot be used.

The method is as follows:

Method one:

windows.location.person.href="NEW_URL";

Method two:

windows.location.person.reload();

Method three:

location.person.replace("NEW_URL");

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