<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body style="margin:0px; padding:0px;">
<div > sdfsdf<br><br>fsdf<br>fsdf</div>
<div > sdfsdf<br><br>fsdf<br>fsdf</div>

<div > sdfsdf<br><br>fsdf<br>fsdf</div>

</dody>

<script>
alert(div1.offsetHeight);
alert(div2.offsetHeight);
alert(div3.offsetHeight);
alert(document.body.clientHeight);

if((div1.offsetHeight + div2.offsetHeight + div3.offsetHeight )<window.document.body.clientHeight)
{
div2.style.height= ( window.document.body.clientHeight- div1.offsetHeight-div3.offsetHeight )+"px";
}
</script>
</html>

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-14
  • 2021-11-19
  • 2021-08-12
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-26
  • 2022-12-23
  • 2021-11-19
  • 2021-11-28
  • 2022-12-23
  • 2021-11-09
  • 2021-07-08
相关资源
相似解决方案