浏览器禁用返回按钮

    history.pushState(null, null, document.URL);
window.addEventListener('popstate', function () {
    history.pushState(null, null, document.URL);
});
原文地址:https://www.cnblogs.com/chengfengchi/p/11360412.html