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