2.htm的代码: function resize() {parent.document.all.ifrm.height=document.body.scrollHeight; parent.document.all.ifrm.width=document.body.scrollWidth; } script>