<iframe id="mainweb" name="mainweb" src="http://www.baidu.com/" border="0" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" width="100%" target="_parent" οnlοad="iFrameHeight()" ></iframe>
<script type="text/javascript" language="javascript">
function iFrameHeight()
{
var ifm= document.getElementById("mainweb");
var subWeb = document.frames ? document.frames["mainweb"].document : ifm.contentDocument;
if(ifm != null && subWeb != null)
{
ifm.height = subWeb.body.scrollHeight;
}
}
</script>