<script>
history.pushState(null, document.title, location.href);
window.addEventListener('popstate', function (event)
{
history.pushState(null, document.title, location.href);
});
window.location.hash="no-back-button";
window.location.hash="Again-No-back-button";//again because google chrome don't insert first hash into history
window.οnhashchange=function(){window.location.hash="no-back-button";}
</script>
It works for most popular browsers.
disable back button of browsers 禁用浏览器后退键
最新推荐文章于 2022-08-25 16:12:26 发布