时间:2021-07-01 10:21:17 帮助过:13人阅读
//禁止浏览器的回退 $(function() { if (window.history && window.history.pushState) { $(window).on('popstate', function () { window.history.pushState('forward', null, '#'); window.history.forward(1); }); } window.history.pushState('forward', null, '#'); //在IE中必须得有这两行 window.history.forward(1); });
相关推荐:
以上就是JS如何实现禁止浏览器回退的详细内容,更多请关注Gxl网其它相关文章!