【发布时间】:2017-08-16 09:58:50
【问题描述】:
当进行更改并重定向到其他页面时会发生这种情况,尤其是在登录或注销期间。 ondevice ready 的代码是,
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
//alert("ready");
navigator.splashscreen.hide();
window.onbeforeunload = null;
}
请提出一种隐藏此原生弹出窗口的方法..
【问题讨论】:
-
我猜它是在您的脚本中编写的自定义逻辑。要禁用此功能,请添加 window.onbeforeunload = null;在你的脚本中
-
请在描述中查看我的脚本,我已经添加了 window.onbeforeunload = null; @甘地
-
window.onbeforeunload = null;不必在设备就绪事件侦听器内。你的设备就绪监听器被调用了吗?
-
@Gandhi 我添加了 window.onbeforeunload = null;在 onBackKeyDown 函数内部,现在它没有显示。谢谢..
-
发布了答案。请接受。干杯
标签: android jquery angularjs cordova mobile-application