禁用浏览器的退回按钮,右键菜单中的退回功能
//禁用浏览器返回
//禁用浏览器后退功能
history.pushState(null, null, document.URL);
window.addEventListener('popstate', function () {
history.pushState(null, null, document.URL);
});
禁用浏览器的退回按钮,右键菜单中的退回功能
//禁用浏览器返回
//禁用浏览器后退功能
history.pushState(null, null, document.URL);
window.addEventListener('popstate', function () {
history.pushState(null, null, document.URL);
});