//监听返回键
window.addEventListener("popstate", function(e) {
closeApp(); //关闭当前页 在这里可以重定向路径 location.href
}, false);
window.history.pushState('forward', null, '#');
window.history.forward();
//监听返回键
window.addEventListener("popstate", function(e) {
closeApp(); //关闭当前页 在这里可以重定向路径 location.href
}, false);
window.history.pushState('forward', null, '#');
window.history.forward();
本文标题:js监听手机的默认返回按钮
本文链接:https://www.haomeiwen.com/subject/squgiftx.html
网友评论