index.htm 部分代码
1<td height="500">
2<iframe align="no" frameborder="0" height="100%" marginheight="0" marginwidth="0" name="free" scrolling="auto" src="message.htm" width="100%"></iframe>
3</td>
有没有办法,当内嵌页面message.htm的高度为多少,外面会自动刚好显示全部!
外面里面页都是htm页面来的
---------------------------------------------------------------
1.
auto_iframe.htm
---------------------------------------
1<iframe frameborder="1" leftmargin="0" marginheight="0" marginwidth="0" name="flashasp" scrolling="no" src="include.htm" style="background-color:#6699FF" topmargin="0"></iframe>
------------------------------------------------------
2.
include.htm
-------------------------------------------------
1<script language="javascript"><!--
2function toppage(){
3if (self.location!=top.location){
4parent.document.all(self.name).height = document.body.scrollHeight + 30;
5parent.document.all(self.name).width = document.body.scrollWidth + 30;
6}
7}
8function window.onload(){
9window.resizeTo(document.body.scrollWidth+10,document.body.scrollHeight+10);}
10// --></script>
1<body onload="toppage()">
2sexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsexsex
3</body>