Reputation: 5426
Can I make a function to refresh the page using JavaScript (same browser refresh button)
Thanks
Upvotes: 8
Views: 43163
Reputation: 21
I added a refresh button in a form I made.
<script>
function refresh(){
window.location.reload("Refresh")
}
</script>
and then called it via button in html:
<p><input type="button" value="Refresh" onClick="refresh(this)"></p>
Upvotes: 2
Reputation: 2168
google? : javascript refresh
<!-- Codes by Quackit.com -->
<a href="javascript:location.reload(true)">Refresh this page</a>
Upvotes: 20