比普通自适应还麻烦一些,是IFRAME调的页面有展开收缩的功能,展开可以把IFRAME撑开,但是收缩后,IFRMAE高度不会跟着收缩,下边就空出一块了,哪位高手 比普通自适应还麻烦一些,是IFRAME调的页面有展开收缩的功能,展开可以把IFRAME撑开,但是收缩后,IFRMAE高度不会跟着收缩,下边就空出一块了,哪位高手帮帮忙,拜谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 就你的分 我是不想把我收藏的代码发出来的 哎还是发了吧<iframe id="frame_content" src="1.html" scrolling="no" frameborder="0" > </iframe><script type="text/javascript">function reinitIframe(){var iframe = document.getElementById("frame_content");try{var bHeight = iframe.contentWindow.document.body.scrollHeight;var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;var height = Math.max(bHeight, dHeight);iframe.height = height;}catch (ex){}}window.setInterval("reinitIframe()", 200);</script> 谢谢,你珍藏的代码,就是我现在用得,我也奇怪,为什么不行,调用页面里的层关闭后,IFRAME不能随着收缩 我自己解决了,这个好使:)<script language="javascript"> function resize(){var h=50;try{if(ifr_lb&&ifr_lb.document&&ifr_lb.document.body){var o=ifr_lb.document.body;var h=o.scrollHeight + (typeof(o.clientTop)== 'number' ?o.clientTop * 2 : 0);}}catch(e){var h=50;window.status=e.description;}if(h<50){h=50;}document.getElementById('ifr_lb').style.height=h+'px';return h+"px";}window.onresize=resize;</script><iframe id="ifr_lb" name="ifr_lb" onload="resize()" frameborder="0" src="http://www.huichi.cn/" scrolling="no" frameborder="no" style="width:100%;;height:expression(resize())" height="22" target="_tc"> ★★100分★★火狐下窗口onresize的时候DIV的位置调整的问题 关于JS实现的图片自动跳转链接问题 求怎样在select下拉框中选取音乐文件名,然后点试听播放的 求老鸟推荐学习javascript好的资料 工作选择 请教javascript高手,有关自定义事件,比较急 JS(JQUERY)问题(不知道错在哪) ext API中缺少属性 关于IE的问题 怎样通过对象的ID取得该对象的值?? 关于JavaScript的问题 网站开发如何实现象路由器登陆一样的( 连接到192.168.1.1 )用户验证方式
<script type="text/javascript">
function reinitIframe(){
var iframe = document.getElementById("frame_content");
try{
var bHeight = iframe.contentWindow.document.body.scrollHeight;
var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
var height = Math.max(bHeight, dHeight);
iframe.height = height;
}catch (ex){}
}
window.setInterval("reinitIframe()", 200);
</script>
<script language="javascript">
function resize(){var h=50;
try{
if(ifr_lb&&ifr_lb.document&&ifr_lb.document.body){
var o=ifr_lb.document.body;
var h=o.scrollHeight + (typeof(o.clientTop)== 'number' ?o.clientTop * 2 : 0);}
}
catch(e){var h=50;window.status=e.description;}
if(h<50){h=50;}
document.getElementById('ifr_lb').style.height=h+'px';
return h+"px";
}
window.onresize=resize;
</script><iframe id="ifr_lb" name="ifr_lb" onload="resize()" frameborder="0" src="http://www.huichi.cn/" scrolling="no" frameborder="no" style="width:100%;;height:expression(resize())" height="22" target="_tc">