浮动层无法遮住object对象
有时候网页需要嵌入delphi等object对象,浮动定位层就无法浮在最上层了,解决办法:
var divWin = document.createElement("div");
divWin.id = "ProgressBarDiv";
divWin.style.cssText = "position:fixed; top:0; left:0; z-index:20000; width:300px; height:300px;filter:alpha(opacity=100);background-color:#000;display:block;";
document.body.appendChild(divWin);
var iframeWin = document.createElement("iframe");
iframeWin.id = "ProgressBarIframe";
iframeWin.style.cssText = "position:fixed;top:0;left:0;width:300px; height:300px;background-color:#000;filter:alpha(opacity=100);display:block;z-index:19999;";
iframeWin.src ="javascript:false;";
document.body.appendChild(iframeWin);
divWin.id = "ProgressBarDiv";
divWin.style.cssText = "position:fixed; top:0; left:0; z-index:20000; width:300px; height:300px;filter:alpha(opacity=100);background-color:#000;display:block;";
document.body.appendChild(divWin);
var iframeWin = document.createElement("iframe");
iframeWin.id = "ProgressBarIframe";
iframeWin.style.cssText = "position:fixed;top:0;left:0;width:300px; height:300px;background-color:#000;filter:alpha(opacity=100);display:block;z-index:19999;";
iframeWin.src ="javascript:false;";
document.body.appendChild(iframeWin);