利用popstate 禁止返回上一页
能用到这个需求的页面大部分估计都是黑五或黄赌
history.pushState(null, null, document.URL); window.addEventListener("popstate",function(e) { console.log(e); history.pushState(null, null, document.URL); }, false);
能用到这个需求的页面大部分估计都是黑五或黄赌
history.pushState(null, null, document.URL); window.addEventListener("popstate",function(e) { console.log(e); history.pushState(null, null, document.URL); }, false);