Friday, 9 November 2012

How to Reload the Page With JavaScript



There are several ways to reload the current page using a button or other trigger. 
The examples below use a button click to reload the page but you can use a text hyperlink or any trigger you like.


<input type="button" value="Reload Page" onClick="window.location.reload()">
<input type="button" value="Reload Page" onClick="history.go(0)">
<input type="button" value="Reload Page" onClick="window.location.href=window.location.href">

No comments:

Post a Comment