I'm writing a mobile app with HTML5, Javascript and CSS3.
I'm using phonegap.
So if I use something like this.
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
document.addEventListener("backbutton", onBackKeyDown, false);
}
function onBackKeyDown() {
alert("test");
}
I get this error:
cordova : You must have cordova.js included in your projects, to be able to trigger events.
I'm using Ripple to emulate a smartphone. And its right. I don't have cordova.js
in my project folder, because I don't know where i get it.
I have downloaded the newest version 2.9.0 of phonegap and using specially cordova-mobile-spec.
There is no cordova.js
just a cordova-incl.js
. How do I obtain this file?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…