<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style type="text/css">
#box_1
{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 50px;
background: #f00;
z-index: 2;
}
#box_2
{
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: blue;
z-index: 1;
}
#box_f
{
position: absolute;
top: 50px;
left: 0;
width: 100%;
background: #d00;
}
</style>
<script type="text/javascript">
function test() {
alert(document.getElementById("box_f").height);
}
</script>
</head>
<body>
<div id="box_1" οnclick="test()">
</div>
<div id="box_2">
<iframe id="box_f" scrolling="no" οnlοad="this.height=box_f.document.body.scrollHeight "
frameborder="0" width="100%" src="webform2.aspx"></iframe>
</div>
</body>
</html>
div学习笔记
最新推荐文章于 2024-07-20 18:10:58 发布