index.html的代码如下:
<iframe src="a.html"></iframe>a.html的代码如下:
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<frameset rows="30,*" cols="*" frameborder="NO" border="0" framespacing="0" id="frame1">
<frame name="top" scrolling="no" noresize src="top.html" frameborder="0">
<frame name="main" scrolling="auto" noresize src="main.html" frameborder="0">
</frameset><noframes></noframes>
</html>问题:
我如何让inde.html里的页面中的<iframe src="a.html"></iframe>中高度 自动适应main.html页面的高度呢?等到高人赐教~~谢谢
<iframe src="a.html"></iframe>a.html的代码如下:
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<frameset rows="30,*" cols="*" frameborder="NO" border="0" framespacing="0" id="frame1">
<frame name="top" scrolling="no" noresize src="top.html" frameborder="0">
<frame name="main" scrolling="auto" noresize src="main.html" frameborder="0">
</frameset><noframes></noframes>
</html>问题:
我如何让inde.html里的页面中的<iframe src="a.html"></iframe>中高度 自动适应main.html页面的高度呢?等到高人赐教~~谢谢
解决方案 »
- ext 问题 在线等!
- 对onbeforeunload的困惑
- 弹出窗口打印代码的问题--是经典的那段代码
- 我想请高手教我一个较复杂的js判断。。。
- 请问这个javascript怎么不对呀
- 高分请教达人:菜单项的动态载入。。。。。。。。
- frame如何刷新啊?
- 现在连数组的定义也很模糊了,int[][] xx = new int[1][1]; 当xx[1][0] = 1;时,这样也会出错,怎么回事?
- win98下面,假如表格行数过多,界面出现混乱,如何解决?
- jq mobile listview li文本居中如何实现
- 页面刷新
- jquery中的setInterval后clearInterval,还能再重新setInterval吗?
<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>
框架页面 就不行了