main.htm:
< html>
'F.R.Huang(meizz梅花雪)//www.meizz.com'> >
child.htm:
(Multi-browser compatible)
{
var a = parent.document.getElementsByTagName("IFRAME");
for(var i=0; i
{ if(a[i].contentWindow==window)
{
var h = document.body.scrollHeight;
if(document .all) {h = 4;}
.opera) {h = 1;} a[i].style.height = h;
}
}
}
catch (ex)
{
alert("Script cannot be operated across domains! ");
}
}
if(document.attachEvent) window.attachEvent("onload", iframeAutoFit);
else window.addEventListener('load', iframeAutoFit, false);
iframe Adapt to the web page it loads (compatible with multiple browsers)