js页面内刷新 怎么才能改变地址栏,使浏览器后退按钮有效。
就想锚链接一样可以后退
window.location.href = ‘’;
onunload时加个时间戳
<script>
document.write(new Date())
window.onunload = function (e) {
location = location.pathname + (location.search ? location.search.replace(/([&\?])_=\d+/, '$1_=' + new Date().getTime()) : '?_=' + new Date().getTime())
}
</script>
window.location.href = “”你要跳转页面的地址“”;