|
注:onload字段中的数值“200”为设置的Iframe最低高度值!
当然iframe,html要在同一子域下才可以,否则警告没有权限.
<iframe src="iframe.html" name="iframe" id="iframe" allowtransparency="true" align="default" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" height="200" width="500" onload="this.height=0;var fdh=(this.Document?this.Document.body.scrollHeight:this.contentDocument.body.offsetHeight);this.height=(fdh>200?fdh:200)//code by Tencent.nokersang">This message is only visible to older browsers.</iframe>
这个脚本测试可以支持IE5.5,IE6.0,FireFox1.x,Opera9.01
|
|