//禁止手機返回鍵 下面這段代碼直接復制在index.html中,可以生效
// $(document).ready(function() {
if (window.history && window.history.pushState) {
window.addEventListener('popstate',function () {
window.history.pushState('forward', null, '#');
window.history.forward(1);
})
}
window.history.pushState('forward', null, '#'); //在IE中必須得有這兩行
window.history.forward(1);
// });
// 2019-02-11 更新,上面的代碼還是作廢吧,當時最后的解決方案也是安卓處理的。