functiondyniframesize(down){varpTar=null;if(document.getElementById){pTar=document.getElementById(down);}else{eval('pTar='+down+';');}if(pTar&&!window.opera){//beginresizingiframepTar.style.display="block"if(pTar.contentDocument&&pTar.contentDocument.body.offsetHeight){//ns6syntaxpTar.height=pTar.contentDocument.body.offsetHeight+20;pTar.width=pTar.contentDocument.body.scrollWidth+20;}elseif(pTar.Document&&pTar.Document.body.scrollHeight){//ie5+syntaxpTar.height=pTar.Document.body.scrollHeight;pTar.width=pTar.Document.body.scrollWidth;}}}从别处贴的代码~~~
百度iframe自适应高度