外部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