object遮盖住div问题

在页面中增加一iframe:
<iframe id="DivFrm" src="" scrolling="no" frameborder="0" style="position: absolute;
                        top: 0px; left: 0px; display: none;"></iframe>

然后在显示该div的脚本里增加显示该iframe:
var divId=document.getElementById("UdivId");
var IfrRef=document.getElementById("DivFrm");
divId.style.zIndex="100";
divId.style.display="";
var v_left=(document.body.clientWidth-divId.clientWidth)/2+document.body.scrollLeft;
var v_top=(document.body.clientHeight-divId.clientHeight)/2+document.body.scrollTop;
divId.style.left=v_left;
divId.style.top=v_top;
IfrRef.style.width = divId.offsetWidth;
IfrRef.style.height = divId.offsetHeight;
IfrRef.style.top = divId.style.top;
IfrRef.style.left = divId.style.left;
IfrRef.style.zIndex = divId.style.zIndex - 1;
IfrRef.style.display = "block";

你可能感兴趣的:(object)