第一种:简单,不支持firefox 运行代码 <iframe id="iFrame1" name="iFrame1" width="100%" onload="this.height=iFrame1.document.body.scrollHeight" frameborder="0" src="http://www.youkuaiyun.com" mce_src="index.htm"></iframe> 第二种: 支持firefox 运行代码 <mce:script type="text/javascript"><!-- function iframeFitHeight(oIframe) {//Iframe窗口自适应高度 兼容IE6.0 FF2.0以上 try { var oWin = oIframe.name ? window.frames[oIframe.name] : oIframe.contentWindow; oIframe.style.height = oWin.document.body.scrollHeight + "px"; } catch(e){} } // --></mce:script> <iframe src="http://www.g.cn" mce_src="http://www.g.cn" onload="iframeFitHeght(this)"></iframe> 在iframe的父窗口加入此函数,用<iframe onload="iframeFitHeght(this)">调用就行