window.history.pushState("","","#"); window.addEventListener("popstate",function(e){ window.location.href = location.href;//这里指定你要跳转的页面 }
【javascript】h5页面禁止返回上一页
原文:https://www.cnblogs.com/ivan5277/p/12053407.html