我只是希望有个进度条,不要求它一定准确的表示现在的进度, 
所以只要显示一个层出来就可以了,在下个页面来了之后,它就没有了
希望有做过该功能的给个源码!在线等待了!

解决方案 »

  1.   

    <!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>