使左右两个DIV高度相等的方法

1 <script type="text/javascript">
2 function height(){
3     document.getElementById("aLeft").style.height = document.getElementById("aRight").offsetHeight + "px";
4 }
5 window.onload = function(){
6     height();
7 }
8 </script>

 

posted @ 2015-06-16 09:25  叶落梦晨  阅读(687)  评论(0编辑  收藏  举报