實例如下所示:
<script> $(function(){ if(window.location.href.indexOf("/login") > -1) { //防止頁面后退 history.pushState(null, null, document.URL); window.addEventListener('popstate', function () { history.pushState(null, null, document.URL); }); } });</script>以上這篇js禁止瀏覽器頁面后退功能的實例(推薦)就是小編分享給大家的全部內(nèi)容了,希望能給大家一個參考,也希望大家多多支持武林網(wǎng)。
新聞熱點
疑難解答