在IE6下 做了一个iframe  是可以显示其内容的  可是换到火狐下 这个iframe就是一片空白
请教高手  
我的代码如下
<td colspan="2" height="34" align="center">
<input type="button" id="arrangeCollection" value="按钮" href="{{site_url url=''}}" 
onclick="showIframe('under_div_f');showArrangeCollectionDiv(this.href,{{$memberInfoArr >member_no}},480,400);return false;">
<iframe id="under_div_f" style="position:absolute;z-index:465;width:expression(this.nextSibling.offsetWidth);
height:expression(this.nextSibling.offsetHeight);top:expression(this.nextSibling.offsetTop);
left:expression(this.nextSibling.offsetLeft);display:none" frameborder="0"></iframe>
<div id="arrangeCollectionDIV" class="zlscj" style="z-index:466"></div>
</td>js:
function showIframe(iframe_id) {
document.getElementById(iframe_id).style.display = "block";
}

解决方案 »

  1.   

    我在做FckEditor的时候,也遇到了这个问题,
    一直没解决,
    那位大侠能帮帮忙,解决一下,
    小子也学习一下,
      

  2.   

    能告诉我 width:expression(this.nextSibling.offsetWidth);   这个是啥意思不 
      

  3.   

    expression 是一个要计算的JavaScript 标准的表达式 耗资源clientHeight
    大家对 clientHeight 都没有什么异议,都认为是内容可视区域的高度,也就是说页面浏览器中可以看到内容的这个区域的高度,一般是最后一个工具条以下到状态栏以上的这个区域,与页面内容无关。offsetHeight
    IE、Opera 认为 offsetHeight = clientHeight + 滚动条 + 边框。
    NS、FF 认为 offsetHeight 是网页内容实际高度,可以小于 clientHeight。
      

  4.   

    如果想跨浏览器,建议将宽度的设置放到文档的onload和onresize事件内进行处理。
      

  5.   

    firefox内核是按照W3C标准,IE则不是 
    楼主去看看吧 
    http://www.cnblogs.com/huqingyu/archive/2008/02/16/1070841.html
      

  6.   

    你为什么不在showIframe里给iframe调整尺寸?
    function showIframe(iframe_id) 

        var obj = document.getElementById(iframe_id);
        obj.style.display = "block";
        obj.style.width = obj.nextSibling.offsetWidth +'px'; 
    }
      

  7.   

    我在showIframe中调整了尺寸  如下 可是还是不行 头疼啊  到底是什么问题啊 function showIframe(iframe_id) {
    var obj = document.getElementById(iframe_id);
            obj.style.display = "block";
            obj.style.width = obj.nextSibling.offsetWidth +'px'; 
    obj.style.height = obj.nextSibling.offsetHeight + 'px';
    obj.style.top = obj.nextSibling.offsetTop + 'px';
    obj.style.left = obj.nextSibling.offsetLeft + 'px';
    //document.getElementById(iframe_id).style.display = "block";
    }
      

  8.   

    前面不是告诉你了么?将style中的expression移到一个函数中,用setTime或setInterval去调