div自适应高度
<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>
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>