Iframes不工作 [英] Iframes not working
问题描述
我正在尝试让Iframe工作。我正在运行safari,所以它是兼容的,但是当我测试它时,它会出现空白。
代码:
< iframe src =http://www.google.comwidth =100%height =300>
< p>您的浏览器不支持iframe。< / p>
< / iframe>
在使用试用编辑器后,我直接从w3schools网站获取代码,因此我知道它应该可以正常工作。当我将页面从其子目录中的页面更改为外部页面时,它显示为空白。
语法正确。这不是你的错 - Google使用 X-Frame-选项
标题,新的浏览器正在监听。
<iframe src="http://www.google.com" width="100%" height="300">
<p>Your browser does not support iframes.</p>
</iframe>
I took the code directly from the w3schools website after using the "try it out" editor so I know it's supposed to work. When I changed the page from a page in their subdirectory to an external page, it shows up blank.
The syntax is correct. It's not your fault - Google is blocking iframing using the X-Frame-Options
header that newer browsers listen to.
Possible workarounds are explained in this Google forum post.
这篇关于Iframes不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!