<div class="RightSpan">
<iframe id="mainFrame" name="mainFrame" src="MainPage.aspx" frameborder="0" scrolling="no" style="width:100%;aho:expression(autoResize())"></iframe>
</div>
定义js函数
function autoResize()
{
try
{
document.all["mainFrame"].style.height = mainFrame.document.body.scrollHeight;
}
catch(e){}
}
![](https://img2024.cnblogs.com/blog/35695/202407/35695-20240713070336838-1837943664.jpg)