猿吟鹤唳本无意,不知下有行人行

俩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();
}

发表评论

您的电子邮箱地址不会被公开。