阻止浏览器后退

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

猜你喜欢

转载自www.cnblogs.com/xy1996/p/12033764.html