禁用浏览器的返回功能

2018-11-05  本文已影响0人  木景蔓
//        禁用浏览器的返回
        window.history.pushState(null, null, document.URL);
        window.addEventListener('popstate', function () {
            window.history.pushState(null, null, document.URL);
        });
上一篇 下一篇

猜你喜欢

热点阅读