2014-03-19 28 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