﻿
function change(){ 
       var con1=document.getElementById("main_left");    
       var con2=document.getElementById("main_right");      
       if (con1.offsetHeight < con2.offsetHeight){           
              con1.style.height=con2.offsetHeight+"px";    
       }
       else{                                                           
              con2.style.height=con1.offsetHeight+"px";    
       }

}



window.onload = function(){ //我们创建一个只要页面被加载时就自动运行的函数

       change();            //执行前面我们创建的 function change() 这个函数

}


