Iframes不工作 [英] Iframes not working

查看:86
本文介绍了Iframes不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试让Iframe工作。我正在运行safari,所以它是兼容的,但是当我测试它时,它会出现空白。
代码:



< iframe src =http://www.google.comwidth =100%height =300>



< p>您的浏览器不支持iframe。< / p>



< / iframe>



在使用试用编辑器后,我直接从w3schools网站获取代码,因此我知道它应该可以正常工作。当我将页面从其子目录中的页面更改为外部页面时,它显示为空白。

解决方案

语法正确。这不是你的错 - Google使用 X-Frame-选项 标题,新的浏览器正在监听。



可能的解决方法在I'm trying to get Iframes to work. I'm running safari, so it is compatible, but when I test it, it comes up blank. Code:

<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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆