【发布时间】:2015-09-28 19:33:46
【问题描述】:
我使用
在我的应用中加载了一个网页window.location.href="http://www.webpage.com";
现在我想在浏览器中打开一个链接,但由于我在 webview 中,我的手机会忽略 window.open('http://webpage.com', '_system', 'location=yes'); 并在 webview 中打开链接...
我该如何解决这个问题(使用 PhoneGap Build)?
有趣的是,“_blank”在使用 ajax 时有效,但在我的情况下 使用 webview 时输出不准确 - 我需要一个带有 webview 的解决方案并覆盖它。
我的 config.xml
<?xml version="1.0" encoding="UTF-8" ?>
<widget xmlns = "http://www.w3.org/ns/widgets"
xmlns:gap = "http://phonegap.com/ns/1.0"
id = "com.me.me"
versionCode = "10"
version = "1.0.0" > <icon src="icon.png" />
<icon src="icon-60@3x.png" gap:platform="ios" width="180" height="180" />
<name>App</name>
<gap:plugin name="cordova-plugin-inappbrowser" source="npm" version="1.0.0" />
<access origin="*" />
<preference name="EnableViewportScale" value="true"/>
<preference name="orientation" value="portrait" />
<preference name="fullscreen" value="true" />
<preference name="DisallowOverscroll" value="true"/>
</widget>
【问题讨论】:
-
你能多谈谈你需要什么吗?您的问题有多种解决方案和方向。
-
我在 webview 中有一个网页。在该网页上,我想在用户浏览器上打开一个链接..
标签: cordova hyperlink webview phonegap-build inappbrowser