freemarker格式控制中iframe经常出现的缩进问题:
freemarker中经常看到页面当嵌入一个iframe时不能显示完整,必须拉动滚动条才能看到完整的页面,而页面的实际大小足够显示所有iframe的内容。
可以写一个简单的js函数
function changeFrmHeight(itemHeight){
$("iframeMain").height=itemHeight+300;
}
出现缩进的页面:
<table id="detailTable" align="center" border=1 height="50%" width="60%" >
....
</table>
<script>
parent.changeFrmHeight($("detailTable").clientHeight);
</script>