iframe 高度调整,正确立即结贴
问题描述:
主页面有几个a标签,
<a href="#" onclick="todo(this,'act')">asdf</a>
<a href="#" onclick="todo(this,'actdd')">asdfddd</a>
主页面内嵌套了iframe.如下:
<iframe name="content_up" id="content_down" marginheight=0 marginwidth=0 border=0
topmargin=0 leftmargin=0 frameborder=0 scrolling="auto"
width="780" height="400"
src="#" onload="this.height="(this.contentDocument||this.contentWindow.document).body.offsetHeight+30">
</iframe>
主页面js
function todo(obj,act){
document.getElementById("content_up").src="aaa.jsp?act="+act;
obj.href="/bbb.do?act="+act;
}
现在每点击一下a标签,iframe 会自动增高,火狐是正常的。但是IE 有问题。。
请教各位解决方案 。。 急用