2014-03-19 33 views
1

我试图使用ios使用phonegap的iframe,这是我使用的代码,在android中工作正常,但不是在ios中,任何想法如何显示iframe?使用phonegap显示iframes ios

<iframe src="https://www.google.com/" style="border:0px #FFFFFF none;" name="myiFrame" scrolling="no" frameborder="1" marginheight="0px" marginwidth="0px" height="70%" width="100%"></iframe> 

回答

0

你有没有在config.xml文件中设置

<access origin="*" /> 

而且也许你需要设置

OpenAllWhitelistURLsInWebView: YES 
ExternalHosts: * 

在Cordova.plist文件。

+0

是的,那是我的config.xml文件的样子 user3424633

+0

那么,是不一样的:“127.0.0.1 *”允许加载所有本地资源,而“*”允许加载所有资源,包括外部的“google.com”。 – Regent

+0

谢谢你的作品完美。 – user3424633