window.addEventListener(“popstate”, function(e) { //回调函数中实现需要的功能
// alert(“我监听到了浏览器的返回按钮事件啦”);
if(this.location.href.endsWith("#/")){ //设置那个页面
WeixinJSBridge.call(‘closeWindow’);//关闭页面
}
}, false);
时间:2019-11-04 07:24:54
window.addEventListener(“popstate”, function(e) { //回调函数中实现需要的功能
// alert(“我监听到了浏览器的返回按钮事件啦”);
if(this.location.href.endsWith("#/")){ //设置那个页面
WeixinJSBridge.call(‘closeWindow’);//关闭页面
}
}, false);