PhoneGap的:打开默认浏览器的URL [英] Phonegap: Open a URL in default browser

查看:1055
本文介绍了PhoneGap的:打开默认浏览器的URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Android开放的默认浏览器网址?

How to open a URL in default browser in android?

我试过< A HREF =#的onclick =window.open('http://www.google.com','_system');> WWW。 google.com< / A> ,但它开辟了在同一个应用程序窗口,但我想它在默认浏览器窗口中打开。

I've tried <a href="#" onclick="window.open('http://www.google.com', '_system');">www.google.com</a> but it opens up in the same app window, but I want it to open up in a default browser's window.

推荐答案

请确保您的应用浏览器插件添加的。请检查一下你的config.xml文件(这是在你的 RES / XML / config.xml中),下面一行是present。

Make sure you added the in app browser plugin. Please check it in your config.xml file(It is in your res/xml/config.xml) the following line is present.

<plugin name="InAppBrowser" value="org.apache.cordova.InAppBrowser" />

像下面你可以添加插件:

Like the following you can add the plugin:

phonegap local plugin add your plugin url here

和也是机会,如果您使用的是可能存在的的PhoneGap构建的在应用程序的浏览器是开放的,而不是默认的系统浏览器(即使您正在使用 _system )。

And also chances may be there if you are using phonegap build the in app browser is open instead of default system browser(even though you are using _system).

有关详细信息,请参阅本<一个href=\"http://stackoverflow.com/questions/15534630/phonegap-build-how-to-open-external-url-in-device-browser-on-android\">Stack溢出的答案

For more details refer this Stack overflow answer

这篇关于PhoneGap的:打开默认浏览器的URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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