美文网首页
禁止浏览器回退

禁止浏览器回退

作者: 8d2855a6c5d0 | 来源:发表于2020-06-29 14:27 被阅读0次

禁止浏览器回退

      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)
      }

相关文章

网友评论

      本文标题:禁止浏览器回退

      本文链接:https://www.haomeiwen.com/subject/djvofktx.html