【javascript】h5页面禁止返回上一页

 window.history.pushState("","","#");
 window.addEventListener("popstate",function(e){
       window.location.href = location.href;//这里指定你要跳转的页面
  }    
posted @ 2019-12-17 11:19  expworld  阅读(3283)  评论(0编辑  收藏  举报