There are many ways to use location.href in javascript, mainly as follows.
self.location.href="/url" The current page opens the URL page
location.href="/url" The current page opens the URL page
windows.location. href="/url" The current page opens the URL page. The first three usages are the same.
this.location.href="/url" Open the URL page on the current page
parent.location.href="/url" Open a new page on the parent page
top .location.href="/url" Open a new page on the top page
If the frame is customized on the page, you can replace the parent self top with the name of the customized frame. The effect is to open the url in the frame window. Address
In addition, window.location.href=window.location.href; and window.location.Reload() both refresh the current page. The difference lies in whether data is submitted. When data is submitted, window.location.Reload() will prompt whether to submit it. window.location.href=window.location.href; will submit the data to the specified url.