法一:在子页面中写代码:
假设主页面有一个div,里面放置一个iframe
<div ).style.height = newHeight;
}
法二,在主页面中写代码:
觉得原来的方法不是很好
- 每一个嵌进来的页面都要去修改
- 占用了每一个嵌进来的页面的onload
所以修改了一下,把函数放在了主页面,ie6、firefox2 通过,希望ie7的网友帮忙测试
页面代码:
<div style="border:1px solid #7e99c6" ;
}
frameWin.style.height = newHeight;
frameBox.style.height = newHeight;
}