Internet Explorer 7/8/9:IFRAME不可见 [英] Internet Explorer 7/8/9 : IFRAME invisible

查看:367
本文介绍了Internet Explorer 7/8/9:IFRAME不可见的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为以下网址创建iframe。
http://www.pgsoftwaresolutions.in/index.html

I am trying to create an iframe for the following url. http://www.pgsoftwaresolutions.in/index.html

<iframe src="http://www.pgsoftwaresolutions.in/index.html" width="255" height="210"></iframe> 

我在本地IE7上尝试过,在browserstack.com上用IE 8/9
页面直接在IE浏览器中加载时,加载计时器正常工作,但在IFRAME中它变得不可见。

I tried it on IE7 locally and IE 8/9 on browserstack.com The page loads the timer works correctly when loaded directly in the IE browser, but when in an IFRAME it becomes invisible.

起初我认为它可能是一个jQuery问题或IE bug关于IFRAME没有触发文件就绪/加载事件。

At first i thought that it might a jQuery issue or IE bug about IFRAME not triggering the document ready/load event.

只是为了测试javascript中出错的地方我在javascript函数中添加了一个javascript alert()来取代
上的代码副本上的计时器上的数字 http://www.pgsoftwaresolutions .in / debug / index.html

Just to test what went wrong where in the javascript i added a javascript alert() in the javascript function which replaces the numbers on the timer on a copy of the above code in http://www.pgsoftwaresolutions.in/debug/index.html

注意:在触发前7个警报后关闭此页面。快速按ENTER键然后按CTRL + F4关闭页面。

NOTE: To close this page after the first 7 alerts are fired. Quickly press ENTER and then CTRL + F4 to close the page.

我在IE 7上测试了它。它工作正常,一系列警报在开始时被触发,然后一个每秒。

I tested it on IE 7. It works and a series of alerts are fired at the start and then one every second.

然后我在IFRAME中加载了相同的页面并且它会抛出警报。

Then i loaded the same page in an IFRAME and it DOES throw the alerts.

<iframe src="http://www.pgsoftwaresolutions.in/debug/index.html" width="255" height="210"></iframe>

我不知道如何在IE7上正确调试与javscript或IFRAME相关的任何内容,因为Firebug lite没有支持那些,所以任何帮助将不胜感激。

I have no clue how to debug anything related to javscript or IFRAMEs on IE7 properly as Firebug lite does not support those so any help will be appreciated.

推荐答案

问题在于你的styles.css。

The problem is in your styles.css.

删除 html {position:relative; } 并且您的iframe将显示在IE7及更高版本中。

Remove html{ position:relative; } and your iframe will display in IE7 and higher.

这篇关于Internet Explorer 7/8/9:IFRAME不可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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