https://blog.csdn.net/xcqingfeng/article/details/70800118

$(function(){  
    pushHistory();  

    window.addEventListener("popstate", function(e) {  //回调函数中实现需要的功能
        alert("我监听到了浏览器的返回按钮事件啦"); 
        location.href='你要跳转的链接';  //在这里指定其返回的地址
    }, false);  
});  
function pushHistory() {  
    var state = {  
        title: "title",  
        url: "__SELF__"  
    };  
    window.history.pushState(state, state.title, state.url);  
}

 

相关文章:

  • 2022-01-08
  • 2021-05-27
  • 2022-12-23
  • 2022-12-23
  • 2021-08-21
  • 2022-12-23
  • 2021-04-12
  • 2021-10-20
猜你喜欢
  • 2022-12-23
  • 2022-02-09
  • 2021-06-14
  • 2021-11-27
  • 2021-06-18
  • 2021-12-26
  • 2021-11-15
相关资源
相似解决方案