iframe的用法
发布网友
发布时间:2022-04-22 07:00
我来回答
共1个回答
热心网友
时间:2022-04-22 08:29
<script language="JavaScript" type="text/JavaScript">
<!--
function SetCwinHeight()
{
var cwin=document.getElementById("cwin");
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>
<IFRAME name="cwin" border=0 marginWidth=0 marginHeight=0 src="tt1.php" frameBorder=no width=570 scrolling=no height=558 onload="Javascript:SetCwinHeight()"></IFRAME>