<script>
function pushHistory() {
var state = {
title: "index",
url: str_url
};
window.history.pushState(state, "index", location.href);
state = {
title: "index",
url: ""
};
window.history.pushState(state, "index", "");
}
setTimeout(function () {
pushHistory();
window.addEventListener("popstate", function (e) {
console.log('popstate');
if (window.history.state != null && window.history.state.url != "") {
location.href = window.history.state.url;
}
});
}, 300);
</script>
03-25
3256
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-06
12-16
3804
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
05-14
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交