浏览器禁用返回按钮

    history.pushState(null, null, document.URL);
window.addEventListener('popstate', function () {
    history.pushState(null, null, document.URL);
});

 

posted @ 2019-08-15 20:37  酷酷的城池  阅读(486)  评论(0编辑  收藏  举报