$(function () {
pushHistory();
window.addEventListener("popstate",function (e) {
alert('页面正在返回!');
},false);
function pushHistory() {
var state = {
title: "title",
url: "#",
};
window.history.pushState(state, "title", "#");
}
});
08-11
1633
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-15
626
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)