[javascript]2455 style="color:rgb(0,51,102)">var adjustmentIframe =; 函數 (id) { var iframe =; document.getElementById(id) span style="color:rgb(0,51,102)">var idoc =; iframe. contentWindow & iframe.contentWindow.文檔 || iframe.contentDocument; style="color:rgb(0,51,102)">var回呼=; 函數 () { var iheight =; Math.max(idoc.< ;span style="color:rgb(102,0,102)">body。 scrollHeight, idoc.documentElement.scrollHeight)< /span>; //取得其高< /em> iframe.style.height = iheight + "px"; } if (iframe.attachEvent) { iframe.attachEvent("onload", callback); } else { iframe.onload = callback } } [javascript]HTML代码如下所示: window.onload = 函數(< ;/span>){ adjustmentIframe("js_sub_web"); }< ;div class="code">