Jquery 在android手机中使用后退/菜单/搜索按钮

Jquery 在android手机中使用后退/菜单/搜索按钮,jquery,android,html,cordova,Jquery,Android,Html,Cordova,我正在使用HTML5、jQuery和Phonegap开发android应用程序。但我无法使用android手机的后退/菜单/搜索按钮。我浏览了phonegap的文档。但还是没有运气。我应该如何处理这些问题?在本文档中,您可以看到您的答案: 这是因为,0.9.6之前版本的phonegap不支持这些事件类型。谢谢您的快速回答。我已经尝试上面的例子很长时间了,但没有得到结果。你能提供完整的例子吗? // This is your app's init method. Here's an example

我正在使用HTML5、jQuery和Phonegap开发android应用程序。但我无法使用android手机的后退/菜单/搜索按钮。我浏览了phonegap的文档。但还是没有运气。我应该如何处理这些问题?

在本文档中,您可以看到您的答案:


这是因为,0.9.6之前版本的phonegap不支持这些事件类型。

谢谢您的快速回答。我已经尝试上面的例子很长时间了,但没有得到结果。你能提供完整的例子吗?
// This is your app's init method. Here's an example of how to use it
function init() {
    document.addEventListener("deviceready", onDR, false);
} 
function onDR(){
    document.addEventListener("backbutton", backKeyDown, true);
    //boot your app...
}
function backKeyDown() { 
    // do something here if you wish
    // alert('go back!');
}