这个页面中有两个iframe,我想让哪个iframe页面的高度较高,这两个iframe的高度都等于这个较高的,怎么实现不了啊?以下为源代码
<script language="javascript">
var leftHeight;
var rightHeight;
leftHeight=o_left2.document.body.scrollHeight;
rightHeight=o_right.document.body.scrollHeight;
alert(leftHeight);
alert(rightHeight);
if (leftHeight>rightHeight){
document.getElementById("o_left2").style.height=leftHeight;
document.getElementById("o_right").style.height=leftHeight;
}else{
document.getElementById("o_left2").style.height=rightHeight;
document.getElementById("o_right").style.height=rightHeight;
}
</script>
<body>
<%@ include file="top.jsp"%><div id="center" style="margin-left:auto; margin-right:auto;width:778px;  border:#CCCCCC solid 1px"> <div id="left" style="width:24%; float:left;  border-right:#00CCFF solid 3px;">
      <div style="word-spacing:normal; width:100%;">
<p align="center">aa</p> <p align="center">欢迎您的到来</p> </div>
<div style="width:100%;">
<iframe src="o_left2.jsp" name="o_left2" id="o_left2" width="100%" scrolling="no" frameborder="0">
</iframe>
</div>
</div>

<div style="float:left;  width:74%; padding-left:5px;">
<iframe src="otherview.jsp" name="o_right" id="o_right" width="100%"  style="border: thin #999999 solid;" scrolling="no">
</iframe>
</div></div>