在微信浏览器中加入window.onpopstate监听事件,但是一直无法触发,后来查找网上资料,找到一个解决办法
<script type="text/javascript">
window.onpopstate = function(event) {
console.log(sfa);
};
//加入以下俩行代码,才能触发
window.history.pushState('forward', null, '#');
window.history.forward(1);
</script>