We can refresh any page by using location object like this.
We will try to explore how different ways we can refresh page by using location object.
We can use onclick event of a button to reload the page like this.
Refreshing page using a button
Here is the demo
<input type="button" name="btn" value="Refresh" onclick="window.location.reload();";>
You can move to previous page by using Back button
Refreshing child window
Same way we can refresh a child window ( from the parent window ) by clicking a button.
You can read more on how to refresh parent window from child window here.
<input type="button" name="btn" value="Refresh" onclick="tm.window.location.reload();tm.focus();";>
This article is written by plus2net.com team.