<script language="javascript"> ?????????//防止页面后退 ?????????history.pushState(null, null, document.URL); ?????????window.addEventListener(‘popstate‘, function () { ?????????????history.pushState(null, null, document.URL); ?????????});</script>
可以屏蔽鼠标和键盘的回退
JS禁用浏览器前进后退
原文地址:https://www.cnblogs.com/taleche/p/10551131.html