网上查了好多 都不怎么好使,下面这条还算比较靠谱, 不过还是没有解决问题
- navigator.app.loadUrl(url,{ openExternal:true });
- The "navigator.app" object is only available on Android. Luckily in the soon to be released 2.3.0 version of PhoneGap you will be able to do:
window.open("http://www.google.com", "_system");
window.open('http://apache.org', '_System', 'location=yes');
Opens a URL in a new InAppBrowser instance, the current browser instance, or the system browser.
var ref = window.open(url, target, options);
- ref: reference to the InAppBrowser window (
InAppBrowser
) - url: the URL to load (
String
). Call encodeURI() on this if you have Unicode characters in your URL. -
target: the target to load the URL in (
String
) (Optional, Default: "_self")_self - opens in the Cordova WebView if url is in the white-list, else it opens in the InAppBrowser _blank - always open in the InAppBrowser _system - always open in the system web browser
-
options: options for the InAppBrowser (
String
) (Optional, Default: "location=yes")The options string must not contain any blank space, each feature name and value must be separated by a comma. Only the value below is supported:
location - set to 'yes' or 'no' to turn the location bar on or off for the InAppBrowser