第一种办法:用 javascript 实现: <script language="javascript" type="text/javascript"> function reheightFrame() { var oChildFrame = document.getElementById('staticIframe'); var nBodyHeight = oChildFrame.contentWindow.document.body.scrollHeight; var nElementHeight = oChildFrame.contentWindow.document.documentElement.scrollHeight; oChildFrame.style.height = Math.max(nBodyHeight, nElementHeight); } window.setInterval("reheightFrame()", 200); </script> 第二种办法:直接在 onload 中实现: <iframe id="frame_content" src="iframe_b.html" mce_src="iframe_b.html" scrolling="no" frameborder="0" οnlοad="this.height=this.contentWindow.document.documentElement.scrollHeight"></iframe>