modkong为赋值对象
简短版
<script type="text/javascript">
window.onload = function() {document.getElementById("modkong").style.height=document.getElementById("divmid").offsetHeight + "px";
}
</script>
繁复版
<script type="text/javascript">
function $(id){
return document.getElementById(id)
}
function getHeight() {
$("modkong").style.height=$("divmid").offsetHeight + "px";
}
window.onload = function() {
getHeight();
}
</script>