//在子窗体中,子窗体操作父窗体元素 ‘loadimg’为父窗体元素编号
parent.document.getElementById('loadimg').style.display='none';
//在子窗体中,设置父窗体的IFrame的高和宽
parent.document.getElementsByTagName('iframe')[0].height=document.body.scrollHeight|document.body.scrollWidth;
兼容IE和FireFox的iframe 自动高度脚本亲自测试过
<html><head><title>兼容IE和FireFox的iframe 自动高度脚本</title><link href="/zbh/css/style.css" rel="stylesheet" type="text/css" /><link rel="Shortcut Icon" href="/share/pic/logo.ico"><link rel="Bookmark" href="/share/pic/logo.ico"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><iframe border=0 marginWidth=0 src="http://baidu.com/" scrolling="no" onload= "this.height=UserFrame.document.body.scrollHeight+20 " width=100% height=100% name="UserFrame" id="UserFrame"></iframe > </body></html>