置空url历史记录

history.pushState(null, null, document.URL)
      window.addEventListener('popstate', function () {
        history.pushState(null, null, document.URL)
      })

 

posted @ 2018-05-14 15:14  撸的一手好诗  阅读(203)  评论(0编辑  收藏  举报