DOCTYPE 标准不能少,在IE6,7,8,FF测试通过,其它的没测试<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<title>test</title>
<body>
<script>
var istop;
if(window.parent && window.parent!=window){istop=top.window;}else{istop=window;}
function loadinginfo(){
var isIE = (document.all) ? true : false;
var isIE6 = isIE && ([/MSIE (\d)\.0/i.exec(navigator.userAgent)][0][1] == 6);
var Bind = function(object, fun) {
return function() {
return fun.apply(object, arguments);}
}
var w = istop.document.createElement("div");
w.setAttribute("id","mybody")
with(w.style){
position = "fixed";
zIndex = '10001';
bottom = 0;
left = 0;
width="300px";
height="20px";
backgroundColor="#FF0000";
lineHeight="20px";
fontSize="12px";
textAlign="center";
}
w.innerHTML="数据处理中,请稍候……"
if(isIE6){
w.style.position ="absolute";
w._fixed = Bind(w, function(){
w.style.marginTop = istop.document.documentElement.scrollTop - w.offsetHeight / 2 + "px";
w.style.marginLeft = istop.document.documentElement.scrollLeft+ "px";});
w._fixed()
istop.attachEvent("onscroll", w._fixed);
w.innerHTML =" 数据处理中,请稍候……"+'<iframe style="position:absolute; visibility:inherit; top:0px; left:0px; width:100%; height:100%; z-index:-1;filter:alpha(opacity=0);"></iframe>'
}
istop.document.body.appendChild(w);
}
function loadingClose(){
istop.document.body.removeChild(istop.document.getElementById("mybody"));
}
loadinginfo();
</script>
</body>
</html>
<html>
<title>test</title>
<body>
<script>
var istop;
if(window.parent && window.parent!=window){istop=top.window;}else{istop=window;}
function loadinginfo(){
var isIE = (document.all) ? true : false;
var isIE6 = isIE && ([/MSIE (\d)\.0/i.exec(navigator.userAgent)][0][1] == 6);
var Bind = function(object, fun) {
return function() {
return fun.apply(object, arguments);}
}
var w = istop.document.createElement("div");
w.setAttribute("id","mybody")
with(w.style){
position = "fixed";
zIndex = '10001';
bottom = 0;
left = 0;
width="300px";
height="20px";
backgroundColor="#FF0000";
lineHeight="20px";
fontSize="12px";
textAlign="center";
}
w.innerHTML="数据处理中,请稍候……"
if(isIE6){
w.style.position ="absolute";
w._fixed = Bind(w, function(){
w.style.marginTop = istop.document.documentElement.scrollTop - w.offsetHeight / 2 + "px";
w.style.marginLeft = istop.document.documentElement.scrollLeft+ "px";});
w._fixed()
istop.attachEvent("onscroll", w._fixed);
w.innerHTML =" 数据处理中,请稍候……"+'<iframe style="position:absolute; visibility:inherit; top:0px; left:0px; width:100%; height:100%; z-index:-1;filter:alpha(opacity=0);"></iframe>'
}
istop.document.body.appendChild(w);
}
function loadingClose(){
istop.document.body.removeChild(istop.document.getElementById("mybody"));
}
loadinginfo();
</script>
</body>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货