当前位置:编程学习 > C#/ASP.NET >>

iframe问题

IE6下iframe窗体显示良好,但在IE7下就显示不行了

出现了滚动条,而且高度限制在很小
更离谱的是,form也被限制了高度,所有表单元素被挤在了一起。

大家以前遇到这种情况了没有,如何解决啊,我在这个论坛喊了好久了,也没人能帮我解决。
我是个菜鸟,js的代码我也用过,一点用都没有,据说scrollheight在IE7下不识别。
怎么办?
大家贴代码就别再网上摘抄了,网上的我试验过了 一点用都没有。谢谢了 --------------------编程问答-------------------- 没遇到过,帮顶 --------------------编程问答-------------------- 自己帮自己帮顶!
急死我了 --------------------编程问答-------------------- --------------------编程问答-------------------- 没有。遇到过。我用IE8都没事
<table border="0"   width="960px" cellspacing="0" cellpadding="0" height="100%" >
<tr>
<td colspan="5" valign="top">
<iframe name="frmTop" src="Admin_Top.aspx"  frameborder="0" border="0" scrolling="no" width="100%"  id="Top" height="58px" ></iframe></td>
</tr>
<tr>
<td style="width:174px; height:545px; vertical-align:top" ><iframe name="frmLeft" src="Admin_Left.aspx"   frameborder="0" border="0" scrolling="no" style="width:174px; height:545px; vertical-align:top" id="Left"> </iframe> </td>
<td style="width:14px; height:545px; vertical-align:top" ><iframe  frameborder="0" border="0" scrolling="no"  id="LeftLine"   style="width:14px; height:545px; vertical-align:top"> </iframe></td>
<td style="width:582px; height:545px; vertical-align:top" ><iframe name="frmCenter" src="Admin_Center.aspx"   style="vertical-align:top" onload="Javascript:SetWinHeight(this)" frameborder="0" border="0" scrolling="no"  width="582px"   id="Center"  height="545px"></iframe></td>
<td style="width:14px; height:545px; vertical-align:top" ><iframe   frameborder="0" border="0" scrolling="no"   id="RightLine"style="width:14px; height:545px; vertical-align:top" ></iframe></td>
<td style="width:176px; height:545px; vertical-align:top"  ><iframe  name="frmRight" src="Admin_Right.aspx"  frameborder="0" border="0" scrolling="no" id="Right" style="width:176px; height:545px; vertical-align:top"> </iframe> </td>
</tr>
</table>

//自动适应iframe的高度适用IE FF
 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;
        }
    }
}

参考下 --------------------编程问答-------------------- up --------------------编程问答-------------------- --------------------编程问答-------------------- 参考
http://blog.csdn.net/net_lover/archive/2006/08/25/1116488.aspx --------------------编程问答-------------------- --------------------编程问答-------------------- --------------------编程问答-------------------- --------------------编程问答-------------------- --------------------编程问答-------------------- 別用iframe,ie7不支持它100%的。

用frameset
--------------------编程问答-------------------- <ifrom id="" name=""></ifrom> --------------------编程问答-------------------- --------------------编程问答-------------------- --------------------编程问答-------------------- --------------------编程问答-------------------- --------------------编程问答-------------------- --------------------编程问答--------------------
补充:.NET技术 ,  组件/控件开发
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,