导航

javascript:history的一些用法

Posted on 2012-09-25 15:11  eastson  阅读(194)  评论(0编辑  收藏  举报
<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

 

原文地址:http://www.mikebai.com/Article/2009-11/757.html