Jquery IE查询iframe的高度

Jquery IE查询iframe的高度,jquery,internet-explorer,iframe,height,Jquery,Internet Explorer,Iframe,Height,我使用以下行控制iframe内容内的高度: $(“#frame”,top.document).height($(“#frame”,top.document).contents().find(“html”).height()) 它工作完美,直到有人使用IE。。我怎样才能让它与IE一起工作 提前感谢,, 埃洛 找到了一个解决方案: var iFrame = parent.document.getElementById('frame'); newHeight = parseInt(iFrame.con

我使用以下行控制iframe内容内的高度:

$(“#frame”,top.document).height($(“#frame”,top.document).contents().find(“html”).height())

它工作完美,直到有人使用IE。。我怎样才能让它与IE一起工作

提前感谢,, 埃洛

找到了一个解决方案:

var iFrame = parent.document.getElementById('frame');
newHeight = parseInt(iFrame.contentWindow.document.body.offsetHeight)+20;
$("#frame",top.document).height(newHeight);
好吧,托马斯,她我们走:

var iFrame = parent.document.getElementById('frame');
newHeight = parseInt(iFrame.contentWindow.document.body.offsetHeight)+20;
$("#frame",top.document).height(newHeight);
好吧,托马斯,她我们走:

var iFrame = parent.document.getElementById('frame');
newHeight = parseInt(iFrame.contentWindow.document.body.offsetHeight)+20;
$("#frame",top.document).height(newHeight);

什么版本的IE?你的问题的本质是什么?是IE7到IE9的问题,但是上面的方法是有效的:)Ello,请将解决方案作为答案发布并接受它!我几乎忽略了这一点——我不会在一个问题上寻找解决方案!什么版本的IE?你的问题的本质是什么?是IE7到IE9的问题,但是上面的方法是有效的:)Ello,请将解决方案作为答案发布并接受它!我几乎忽略了这一点——我不会在一个问题上寻找解决方案!