大概就这样.
<style>
.FullFrame{width:expression(this.document.body.clientWidth);height:expression(this.document.body.clientHeight-30);}
</style>
<style>
.FullFrame{width:expression(this.document.body.clientWidth);height:expression(this.document.body.clientHeight-30);}
</style>
非常感谢!再帮帮我!另外开帖加分!
.FullFrame{width:expression(this.document.body.clientWidth);height:expression(this.document.body.clientHeight-30);}
</style>
好像取到的是当前文件的body高;子frame里的高怎么取??
parent.document.all["frame1"].height = document.all["table1"].clientHeight + 5;
改成这样
parent.document.all.HomeIframe.height=document.body.scrollHeight;
然后放在子文件里,可以做到改变iframe高度的效果。
但每个调用的文件都要改……笨办法。
有没有更好的?
<td width="77%" height="258" valign="top" class="leftline" id="mainview">
<iframe src="UnitInf/view.asp?id=<%=id%>" width="100%" height="100%" name="right" scrolling="no" border="0" frameborder="0">
</iframe>
</td>
</tr>
</table>
<script language="JavaScript" for="right" event="onload">
mainview.height=right.document.body.scrollHeight+10; //.............
</script>