以下资料为网上搜索方法,然后根据自己实际使用编写。
--------------------------------用Iframe框架做DIV的底层,这样可以在IE6显示时,DIV被其它控件遮挡-----------------------------------------
<div id="divShowUserInfo" style=" background-color: #FFFFCC; z-index:10000; position:absolute; width: 580px; height: 600px; left: 25%; top: 25%; border:1px solid #CCC; text-align: center; display:none;" >
</div>
<iframe id="iframeEditUserInfo" src="" scrolling="no" frameborder="0" style="position:absolute; display:none;">
</iframe>
<script language="javascript" type="text/javascript">
function ShowHideUserDialog() {
var ShowUserDialog = document.getElementById("divShowUserInfo");
var iFrameEditUser = document.getElementById("iframeEditUserInfo");
if (ShowUserDialog.style.display == "block") {
ShowUserDialog.style.display = "none";
iFrameEditUser.style.display = "none";
}
else {
ShowUserDialog.style.display = "block";
iFrameEditUser.style.display = "block";
iFrameEditUser.style.left = ShowUserDialog.style.left;
iFrameEditUser.style.top = ShowUserDialog.style.top;
iFrameEditUser.style.width = ShowUserDialog.offsetWidth;
iFrameEditUser.style.height = ShowUserDialog.offsetHeight;
iFrameEditUser.style.zIndex = ShowUserDialog.style.zIndex - 1;
}
}
</script>