屏蔽页面回退操作JS

2019-04-17  本文已影响0人  HHHHUA

屏蔽页面回退操作

<script language="javascript">
        history.pushState(null, null, document.URL);
        window.addEventListener('popstate', function () {
            history.pushState(null, null, document.URL);
        });
    </script>
上一篇 下一篇

猜你喜欢

热点阅读