我在phoneGap Android中开发了一个应用程序。
在我的应用程序后退按钮无法正常工作。后退按钮无法正常工作?
我用这个代码导航形式:
document.addEventListener("backbutton", handleBackButton, true);
function handleBackButton()
{
if (typeof(navigator) != 'undefined' && typeof(navigator.app) != 'undefined' && typeof(navigator.app.backHistory) == 'function')
{
history.go(-1);
navigator.app.backHistory();
}
else
{
history.go(-1);
//navigator.app.backHistory();
}
}
其工作是如下:
例如我有三个a.html
页,b.html
,c.html
我从a.html
导航到b.html
至c.html
问题
当我点击后退按钮,它从导航到c.html
b.html
,
再这个过程是重复的,它不会去a.html
。
你正在使用任何框架工作为像用户界面像JqueryMobile –
不,我不会使用jquerymobile – JavaH