0

我正在使用旧系统。Bootstrap无法在iframe中使用IE 6

为了不浪费时间了解旧的HTML代码,我在一个Iframe中使用了bootstrap。

这就是这个页面的样子。 Google Chrome浏览器工作正常。

Iframe Working on Google Chrome

正如你可以看到,红色区域是我的iframe,使用CSS。

style="width: 100%; height: 100%; border:none;" 

在IE6上,历史记录发生变化。

Iframe not working on IE6

IE不接受的宽度和高度的任何代码。我已经尝试了这个JavaScript代码,没有成功。

function autoResize(id) { 
    var newheight; 
    var newwidth; 

    if (document.getElementById) { 
     newheight = document.getElementById(id).contentWindow.document.body.scrollHeight; 
     newwidth = document.getElementById(id).contentWindow.document.body.scrollWidth; 
    } 

    document.getElementById(id).height = (newheight) + "px"; 
    document.getElementById(id).width = (newwidth) + "px"; 
} 

正如你所看到的,宽度和高度是我的第一个问题。 Bootstrap在iframe中也没有正确显示。

我需要一只手来找到解决这个问题的方法。

+0

哪个版本? – dlev

+0

IE6。相信我,我需要在IE6上工作。 -_- – MarceloBarbosa

+0

IE6?祝你好运! :-D –

回答

1

我相信这会回答你的问题。

+0

感谢您的编辑,我忘记了您可以在答案中使用HTML标记。 – Mortiferr