javascript几种跳转及刷新页面的实例

Javascript跳转:

<input type="button" value="刷新" onclick="window.location.reload()">
<input type="button" value="前进" onclick="window.history.go(1)">
<input type="button" value="后退" onclick="window.history.go(-1)">
<input type="button" value="前进" onclick="window.history.forward()">
<input type="button" value="后退" onclick="window.history.back()">
<input type="button" value="后退+刷新" onclick="window.history.go(-1);window.location.reload()">

Javascript刷新页面:

history.go(0)
location.reload()
location=location
location.assign(location)
document.execCommand('Refresh')
window.navigate(location)
location.replace(location)
document.URL=location.href

评论

评论正在提交中...请稍后
评论提交成功...