返回上一页
- window.history.go(-1);//返回上一页不刷新
- window.history.back(); //返回上一页 只是单纯的返回到上一页
- window.location.href = document.referrer;//返回上一页并刷新,真正实现页面后退并刷新页面
- history.go(1);//前进一页
- history.forward(); //前进一页
Javascript刷新页面的几种方法:
history.go(0)
location.reload()
location=location
location.assign(location)
document.execCommand(‘Refresh’)
window.navigate(location)
location.replace(location)
document.URL=location.href