如何删除手机应用程序
问题描述:
更改时,尤其是登录或注销时重定向到其他页面会出现这种情况确认导航弹出。 代码ondevice准备是,
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
//alert("ready");
navigator.splashscreen.hide();
window.onbeforeunload = null;
}
请提出一个方法来隐藏这个本地弹出..
答
添加以下行的代码,
window.onbeforeunload =空值;
该行不需要放置在deviceready事件侦听器中。它可以放在它在点击后退按钮期间或页面重新加载期间调用的函数上。
我想它是一个写在你的脚本中的自定义逻辑。要禁用此功能,请添加window.onbeforeunload = null;在你的脚本中 – Gandhi
请在描述中检查我的脚本,我已经添加了window.onbeforeunload = null; @Gandhi –
window.onbeforeunload = null;不需要在设备就绪事件监听器内部。您的设备准备好的监听器正在被调用? – Gandhi