打开系统的默认浏览器与科尔多瓦3和jQuery Mobile的链接 [英] Open a link in the default browser of a system with cordova 3 and jquery mobile

查看:270
本文介绍了打开系统的默认浏览器与科尔多瓦3和jQuery Mobile的链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,我使用jQuery Mobile和科尔多瓦3 Android设备上工作的周围。

Hi I'm working around with jquery mobile and cordova 3 on a android device.

一切正常,只是我可以伟大,不是在默认浏览器或例如地图应用程序中打开的链接。

Everything works great except that I can't open links in the default browser or for example the maps application.

我可以用inappbrowser插件,打开它,但我不想这样做。我只是想打开的链接,用默认的浏览器的网站。

I can open it with a inappbrowser plugin but I dont want to do that. I just want to open the links to websites with the default browser.

我试过很多事情喜欢这里:

I tried many things like here:

<一个href=\"http://stackoverflow.com/questions/21273735/opening-link-in-system-browser-in-phonegap-3-3-on-android\">Opening Link在系统浏览器中的PhoneGap 3.3在Android

<一个href=\"http://stackoverflow.com/questions/22484648/open-links-in-default-browser-using-phonegap-cordova\">Open使用默认浏览器链接的PhoneGap /科尔多瓦

但我看到的答案都出现了与我不希望inappbrowser的解决方案。

But I saw that the answers are showing the solution with the inappbrowser which I dont want.

我该如何解决呢?

感谢您的帮助。

推荐答案

有关Android操作系统使用以下code。

For Android OS use following code.

navigator.app.loadUrl("http://google.com", {openExternal : true});

或通过内嵌的JavaScript:

or through inline JavaScript:

<a onclick="navigator.app.loadUrl('https://google.com/', { openExternal:true });">Link</a>

它将不会与iOS的工作,另外,我不知道,如果当前存在于iOS的解决方案,不要求 inappbrowser

这篇关于打开系统的默认浏览器与科尔多瓦3和jQuery Mobile的链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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