日期: 2013年11月12日

  • 俩div左右两侧自适应高度对齐

    function $(mo_l){
    return document.getElementById(mo_l)
    }
    function getHeight() {
    if ($(“mo_l”).offsetHeight>=$(“mo_r”).offsetHeight){
    $(“mo_r”).style.height=$(“mo_l”).offsetHeight + “px”;
    }
    else{
    $(“mo_l”).style.height=$(“mo_r”).offsetHeight + “px”;
    }
    }
    window.onload = function() {
    getHeight();
    }