问题
I would like to know how to implement a "ctrl+f5" command into my HTML page. I can use javascript or html.
It should be run only when people click in a link.
Thanks, Alex
回答1:
You should be able to use this javascript to suite your need:
onClick="window.location.reload(true)"
window.location.reload(true)
has been deprecated. You can use:
window.location.href = window.location.href
回答2:
Something like this?
<a href="document.location.reload(true);document.location='/mylink'">Click here to refresh the page</a>
回答3:
you can create a button for refresh , add the following code into your html page
<a href="JavaScript: location.reload(true);">Refresh page</a>
来源:https://stackoverflow.com/questions/22841312/full-refresh-of-page-ctrlf5