无法关闭HTML5的应用程序(包装上的PhoneGap) [英] Can not close html5 application (wrapped on Phonegap)

查看:118
本文介绍了无法关闭HTML5的应用程序(包装上的PhoneGap)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有建于HTML5和包裹在PhoneGap的应用程序,以pressing退出按钮下面的函数发生:

I have an application built in html5 and wrapped in phoneGap, by pressing the exit button the following function occurs:

function close_window() {
    if (confirm("Exit?")) {
        navigator.app.exitApp();
    }
}

它不工作..

It does not work..

在点击按钮的功能close_window()时,'但navigator.app.exitApp();'行没有工作。

On clicking the button the function close_window() occurs, 'but navigator.app.exitApp();' line not works.

我想这是因为对导航无子命名的应用程序。(我测试了它在控制台)

I think it's because there is no child named app for navigator.. (I tested it in console)

还有没有其他的方法来关闭应用程序?

Are there other ways to close an application?

推荐答案

最后的问题解决了。

退出应用程序的工作原理是功能写了问题。

Exit application works by the function write-up question.

我不知道我改变了它的工作原理,,但它的作品!

I have no idea what I changed that it works, but it works!!

感谢您的帮助。

:]

这篇关于无法关闭HTML5的应用程序(包装上的PhoneGap)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆