原创  根据内容自动高速页面中帧的高度 收藏

iframe:
<iframe id="oIfrm" src="open.htm" onload="_resize()" width="320"></iframe>


function _resize(){
  var o=document.frames("oIfrm").document.body;
  document.all.oIfrm.style.pixelHeight= o.scrollHeight + 20;
  
      }

-------------------------------------------------------------------------------------------------------------------------


frame:

<script language=javascript>
function _resize(){
 oFrm.rows=document.frames("top").document.body.scrollHeight + ",*";
 alert(document.frames("top").document.body.scrollHeight);
}
</script>
</head>
<frameset cols=100,*>
 <frame src=about:blank>
  <frameset id="oFrm" rows="100,*">
   <frame name=top id=top src=frame1.asp onload="_resize()">
   <frame name=main src=frame2.htm>
  </frameset>
 <frame src=frame1.asp>
</frameset>

发表于 @ 2004年09月28日 10:38:00 | 评论( loading... ) | 编辑| 举报| 收藏

旧一篇:XSLT中截取等长字符串 | 新一篇:asp中创建XML文件,自动缩进解决方案

  • 发表评论
  • 评论内容:
  •  
Copyright © ssm1226
Powered by CSDN Blog