首页 > 技术文章 > 浏览器禁用返回按钮

chengfengchi 2019-08-15 20:37 原文

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

 

推荐阅读