这是用来控制边栏随页面自动延伸高度的js代码
<script language=”javascript”>
document.getElementById(”left”).style.height=document.getElementById(”middle”).scrollHeight+”px”
document.getElementById(”right”).style.height=document.getElementById(”middle”).scrollHeight+”px”
</script>
在页面的开始对两个层进行了定义,注意js里的id要与css定义的id对应。
#left{
background-color:#444444;
width:30%;
position:absolute;
}
#middle{
font-size:14px;
color:#333;
margin-left:30%;
background-color:#666666;width:70%;
position:absolute;
}
