框架自适应高度实例
程序员文章站
2022-04-18 09:20:41
...
<html>
<div id="div111" align="center">
<IFRAME id="frm" style="WIDTH: 100%" border="0" name="List" arginWidth="0"
frameSpacing="0" marginHeight="0" src="test2.html" frameBorder="0"
noResize width="100%" scrolling="no" height="100%" vspale="0" align="middle">
</IFRAME>
</div>
</html>
index.html
<html> <body>
<br>aaaaaaaaaaaaaaaaaaaaa
<br>aaaaaaaaaaaaaaaaaaaaa
<br>aaaaaaaaaaaaaaaaaaaaa
<br>aaaaaaaaaaaaaaaaaaaaa
<br>aaaaaaaaaaaaaaaaaaaaa
<br>aaaaaaaaaaaaaaaaaaaaa
<br>aaaaaaaaaaaaaaaaaaaaa
<br>aaaaaaaaaaaaaaaaaaaaa
<br>aaaaaaaaaaaaaaaaaaaaa
<br>aaaaaaaaaaaaaaaaaaaaa
<br>aaaaaaaaaaaaaaaaaaaaa
<br>aaaaaaaaaaaaaaaaaaaaa
<br>aaaaaaaaaaaaaaaaaaaaa
<br>aaaaaaaaaaaaaaaaaaaaa
<br>aaaaaaaaaaaaaaaaaaaaa
<br>aaaaaaaaaaaaaaaaaaaaa
<br>aaaaaaaaaaaaaaaaaaaaa
<br>aaaaaaaaaaaaaaaaaaaaa
<br>aaaaaaaaaaaaaaaaaaaaa
<br>aaaaaaaaaaaaaaaaaaaaa
<br>aaaaaaaaaaaaaaaaaaaaa
<script src="jquery-1.2.6.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
setFrmHeight();
});
function setFrmHeight() {
var frm = $(window.parent.document).find("#frm");
var height = $(document).height();
//alert(height);
frm.height(height);
}
</script>
</body>
</html>
test2.html