[b]aa.html[/b]
<html>
<head>
<title></title>
</head>
<body>
<p class="aaClass" id="aa" style="height:300px; border:1px solid black;">aa.html</p>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<body>
<div style="border:1px solid #7e99c6" id="frameBox">
<iframe id="frameWin" src="aa.html" name="opWin" style="width:100%; height:100% " frameborder="0" scrolling="no"
onload="test2()"></iframe>
</div>
<script type="text/javascript">
function test2() {
var frameWin = document.getElementById("frameWin");
var frameBox = document.getElementById("frameBox");
var newHeight;
if (frameWin.Document) {
newHeight = frameWin.Document.body.scrollHeight + 20 + "px";
} else {
newHeight = frameWin.contentDocument.body.scrollHeight + 20 + "px";
}
frameWin.style.height = newHeight;
frameBox.style.height = newHeight;
}
</script>
</body>
</html>