if (window.history && window.history.pushState) {
history.pushState(null, null, document.URL);
setTimeout(() => {
window.addEventListener("popstate", myfuntion, false); //false阻止默认事件
//myfunction 页面回退前执行的函数
//监听页面回退
}, 0);
}