浏览器回退事件监听

(function(){
   if (window.history && window.history.pushState) {
     $(window).on('popstate', function () {
          //do something
   });
}

   window.history.pushState('forward', null, '#');
   window.history.forward(1);
})();

posted @ 2017-12-05 10:46  rocky-2013  阅读(124)  评论(0)    收藏  举报