2014-07-25 207 views
0

我的页面中有一个iframe会加载本地html内容,但不加载远程Web内容。Web内容未加载iframe

下面是代码:

<iframe id="frame1" src="http://localhost/test.html" width="520px" height="400px" scrolling="auto"></iframe> 

这是工作。

但下面的代码是不工作:

<iframe id="frame1" src="http://www.google.co.in/" width="520px" height="400px" scrolling="auto"></iframe> 

请任何帮助

+1

第二个需要互联网连接才能工作。 –

+0

是的互联网连接,,, –

回答

0

如果你看一看到控制台中看到这一点:

[Error] Refused to display 'https://www.google.co.in/?gws_rd=ssl' in a frame 
because it set 'X-Frame-Options' to 'SAMEORIGIN'. 

意味着什么,谷歌不希望显示的iframe中。

更多关于X-Frame-Options