为什么不使用EventListener?
<script>
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
alert1("A", "B");
}
document.addEventListener("backbutton", onBackKeyDown, false);
function onBackKeyDown() {
alert("A");
}
</script>
我按下我的手机按钮,不要浮动警报。并且,控制台日志是
cordova.js:967 Uncaught Error: Java exception was raised during method invocation
at pollOnce (file:///android_asset/www/cordova.js:967:40)
at pollOnceFromOnlineEvent (file:///android_asset/www/cordova.js:958:5)
cordova.js:967 Uncaught Error: Java exception was raised during method invocation
at pollOnce (file:///android_asset/www/cordova.js:967:40)
at pollOnceFromOnlineEvent (file:///android_asset/www/cordova.js:958:5)
我该如何解决?