There is no eternal technology only abnormal demand, not to say that the client only helpless developers, if the appearance of the IFRAME is a mistake, iframe inside in to an IFRAME that is wrong on the wrong, the myth is not in the ancient Madding crowd disappeared, but in the bosom of today constantly staged
Life is always a big dyeing tank, a piece of white cloth down, black cloth out, a black cloth down, a piece of seven knitted fabric out.
Contentwindow compatible with individual browsers, you can get window objects for child windows.
Contentdocument Firefox supports,> IE8 's IE support. The document object for the child window can be obtained.
Set the parent iframe in the child iframe, or the height of the sun-level iframe.
Copy Code code as follows:
function Showiframeh () {
var Parentwin = parent.document.getElementById ("test");
if (!parentwin) return false;
var sub = parentWin.contentWindow.document.getElementById ("Test2");
if (!sub) return false;
var thirdheight = sub.contentWindow.document.body.offsetHeight; Third Layer Body Object
sub.height = thirdheight; Set the height of the second layer of IFRAME
var secondheight = x.contentwindow.document.body.offsetheight; Second Layer Body Object
x.height = secondheight; Set the height of the first layer of IFRAME
//alert (secondheight);
//alert (' body: ' + x.contentdocument.body.offsetheight + ' div: ' + thirdheight);
}