div里面的iframe如何自适应高度iframe链接表格

默认分类 未结 1 1480
___凝萌丶
___凝萌丶 2023-03-22 13:46
相关标签:
1条回答
  • 2023-03-22 14:06

    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自适应高度

    0 讨论(0)
提交回复