在IE中空白iFrame [英] Blank iFrame in IE

查看:690
本文介绍了在IE中空白iFrame的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个iframe:

I have an iframe:

<iframe src="http://externaldomain.com/something.html">

如果来自externaldomain.com的something.html包含css:

If something.html from externaldomain.com has the css:

html { position: relative; }

在IE中,它会将iframe显示为空白。所有其他浏览器都很好。

In IE, it will render the iframe as blank. All other browser are fine.

任何人都知道一个解决方案?记住相同的起源政策。我不能使用javascript修改iframe中的任何内容或者更改css作为iframe src是外部的。

Anyone know of a solution? Remember the same origin policy. I cannot alter anything within the iframe with javascript or change the css as the iframe src is external.

谢谢。

推荐答案

我会先阅读这个另一个跨域iFrame通信技术,然后看一个更优雅的AJAX解决方案。我已经看到很多情况下,跨域iframe只是不工作(和很好的理由)。

I would start by reading this Another Cross Domain iFrame Communication Technique and then look at a more elegant AJAX solution. I have seen a lot of situations where cross-domain iframes just don't work (and for good reason).

IFrame是IE上的一步,在邪恶轴(IMO)

IFrames are one step above IE in the Axis of Evil (IMO)

这篇关于在IE中空白iFrame的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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