1.javascript代码
<script type="text/script">
function iframeURI()
{
document.getElementById("frameId").src = "ModifyPage.jsp";
}
function iFrameHeight() //iframe框架高度自适应
{
var ifm= document.getElementById("frameId");
var subWeb = document.frames ? document.frames["frameId"].document:ifm.contentDocument;
if(ifm != null && subWeb != null) {
ifm.height = subWeb.body.scrollHeight;
}
}
</script>
2.JSP页面
<iframe id="frameId" frameborder="0" background="#9ecbe4" width="550px">
</iframe>