How to refresh a page using JavaScript


To refresh a web page using JavaScript we can use reload function and pass true parameter through this, to define that we want same page to reload we can give the location on same document. So final JavaScript code which will reload the web page through a html button is as follows 

 Javascript |  copy code |? 
<input type="button" value="Reload Page" onClick="document.location.reload(true)">   

Leave a Comment

Your email address will not be published.