<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<script type="text/javascript">function SetCwinHeight(obj)
{
var cwin=obj;
if (document.getElementById)
{
if (cwin && !window.opera)
{
if (cwin.contentDocument && cwin.contentDocument.body.offsetHeight)
cwin.height = cwin.contentDocument.body.offsetHeight;
else if(cwin.Document && cwin.Document.body.scrollHeight)
cwin.height = cwin.Document.body.scrollHeight;
}
}
}
</script></head>
<body onload="">
<form id="form1" runat="server">
<div>
<iframe width="778" align="center" height="200" id="cwin" name="cwin" src="http://www.sina.com" onload="Javascript:SetCwinHeight(this)" frameborder="0" scrolling="no"></iframe>
</div>
</form>
</body>
</html>
<head runat="server">
<script type="text/javascript">function SetCwinHeight(obj)
{
var cwin=obj;
if (document.getElementById)
{
if (cwin && !window.opera)
{
if (cwin.contentDocument && cwin.contentDocument.body.offsetHeight)
cwin.height = cwin.contentDocument.body.offsetHeight;
else if(cwin.Document && cwin.Document.body.scrollHeight)
cwin.height = cwin.Document.body.scrollHeight;
}
}
}
</script></head>
<body onload="">
<form id="form1" runat="server">
<div>
<iframe width="778" align="center" height="200" id="cwin" name="cwin" src="http://www.sina.com" onload="Javascript:SetCwinHeight(this)" frameborder="0" scrolling="no"></iframe>
</div>
</form>
</body>
</html>
function SetWinHeight(obj)
{
var win=obj;
if (document.getElementById)
{
if (win && !window.opera)
{
if (win.contentDocument && win.contentDocument.body.offsetHeight)
win.height = win.contentDocument.body.offsetHeight;
else if(win.Document && win.Document.body.scrollHeight)
win.height = win.Document.body.scrollHeight;
}
}
}
<iframe id="myframe" src="#" frameborder=0 onload="SetWinHeight(this)" width="100%" height="400px" scrolling=no></iframe>