加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

iphone – Phonegap App:外部URL无法在IOS的InApp浏览器中打开

发布时间:2020-12-14 17:50:33 所属栏目:百科 来源:网络整理
导读:外部URL无法在我的PhoneGap IOS应用程序的系统浏览器中打开.我正在使用PhoneGap Build 2.7.0. 使用Javascript: window.open(myURL,’_ blank’,’location = yes’); config.xml中 plugins plugin name="InAppBrowser" value="CDVInAppBrowser" //pluginsac
外部URL无法在我的PhoneGap IOS应用程序的系统浏览器中打开.我正在使用PhoneGap Build 2.7.0.

使用Javascript:

window.open(myURL,’_ blank’,’location = yes’);

config.xml中

<plugins>
    <plugin name="InAppBrowser" value="CDVInAppBrowser" />
</plugins>

<access origin="*" />

怎么解决这个?当我使用网址“www.google.com”它工作正常,但当我使用我的应用程序所需的网址,它甚至没有工作,即使该网址在浏览器中正常工作.

解决方法

使用Javascript:

myURL = encodeURI(myURL);
window.open(myURL,'_blank','location=yes');

Using of encodeURI method fix the above issue

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读