<iframe width="778" align="center" height="200" id="cwin" name="cwin" "Javascript:SetCwinHeight(this)" frameborder="0" scrolling="no"></iframe>
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;
}
}
}
引用时
"javascript:SetCwinHeight(this)"
iframe框架页自适应
最新推荐文章于 2024-08-20 23:46:15 发布