js 防止页面后退的方法

            //防止页面后退
            history.pushState(null, null, document.URL);
            window.addEventListener('popstate', function () {
                history.pushState(null, null, document.URL);
            });

 

posted on 2016-10-25 09:36  空明流光  阅读(2312)  评论(0编辑  收藏  举报

导航