1:跳转到h5之后 先给页面堆栈,然后就可以监听到返回事件了
<script> window.history.pushState(null, null, window.location.hash); window.addEventListener("popstate", function (e) { window.history.pushState(null, null, window.location.hash); alert('拦截') }) </script>