Commit a93e2609 authored by 李晓兵's avatar 李晓兵

'禁用安卓物理返回键'

parent 9c741f6d
......@@ -27,6 +27,7 @@
history.pushState(null, null, document.URL)
// 给 popstate 绑定一个方法 监听页面刷新
window.addEventListener('popstate', function(){
history.pushState(null, null, location.href );
alert('请点击左上角返回按钮返回')
}, false) // false阻止默认事件
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment