function change_size(iframe) { iframe.style.height=info_content.document.body.scrollHeight+1+"px"; } 我用過這種方式,但是等號后面的第一個對象不知道應該怎樣動態(tài)顯示。 比如: function change_size(no) { var el_name = "iframe"+no; el = document.getElementById(el_name); el .style.height=el.document.body.scrollHeight+1+"px"; //舉例,實際不能調(diào)整高度,因為后面的el不能指向正確的對象 }