div自适应高度

it2022-05-07  0

<script language="javascript">      var ctl=document.getElementById("divSlo");      if(ctl.offsetHeight < 400)     {        ctl.style.height = ctl.offsetHeight+"px";     }    else    {     ctl.style.height = "400px";     ctl.style.overflowY="auto";     }          </script>

转载于:https://www.cnblogs.com/Look_Sun/archive/2011/03/02/1968772.html


最新回复(0)