禁用移动端回退功能
这里的方法用于防止用户通过手机端的后退,再次回到之前的页面
//这里的方法用于防止用户通过手机端的后退,再次回到之前的页面 if(window.history && window.history.pushState){ $(window).on('popstate',function () { window.history.pushState('forward',null,'#'); window.history.forward(1); }) } window.history.pushState('forward',null,'#'); window.history.forward(1);