通过ifame指向的页面高度调整iframe的高度
时间:2021-02-23 15:13:54|栏目:JavaScript代码|点击: 次
通过ifame指向的页面高度调整iframe的高度
1.htm的代码:
<iframe src=2.htm id=ifrm></iframe>
2.htm的代码:
<script>
function resize()
{parent.document.all.ifrm.height=document.body.scrollHeight;
parent.document.all.ifrm.width=document.body.scrollWidth;
}
</script>
<body onload="resize()">
</body>
1.htm的代码:
<iframe src=2.htm id=ifrm></iframe>
2.htm的代码:
<script>
function resize()
{parent.document.all.ifrm.height=document.body.scrollHeight;
parent.document.all.ifrm.width=document.body.scrollWidth;
}
</script>
<body onload="resize()">
</body>
上一篇:JS中的算法与数据结构之字典(Dictionary)实例详解
栏 目:JavaScript代码
本文标题:通过ifame指向的页面高度调整iframe的高度
本文地址:http://www.codeinn.net/misctech/68193.html






