js实现禁止浏览器后退

来源:互联网 发布:mac 虚拟机 win10 好吗 编辑:程序博客网 时间:2024/06/05 16:18
history.pushState(null, null, document.URL);window.addEventListener('popstate', function () {    history.pushState(null, null, document.URL);});