zoukankan      html  css  js  c++  java
  • 页面正在载入中

    页面正在载入(js代码)   

    2009-12-04 12:33:36|  分类: 编程—JavaScript|字号 订阅

     
     

     <!---加载进度条---->

    <script type="text/javascript">

    <!--

    document.write('<div id=divShowLoading style="position:absolute; display:none;">'+  

                                        '页面正在载入,请等待<span></span></div>');  

     function showProcess() 

         GetMsg();

    }

    var timerId=null;

    function GetMsg()

    {

        var msg = document.getElementById("divShowLoading");

        msg.style.left = (document.body.clientWidth - 220) / 2;

        msg.style.top = window.screen.height / 3 - 120;

        if(window.document.readyState != null && window.document.readyState != 'complete')

        {

            msg.style.display = "block";

        }   

        else

        {

            msg.style.display = "none";

            window.clearTimeout(timerId);

            return;

        }

        timerId=window.setTimeout('GetMsg()',1000);

    }

    showProcess(); 

    //-->

    </script> 

    <!---加载进度条---->

    ===================================================

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns=" http://www.w3.org/1999/xhtml">

     <head>

      <title> new document </title>

      <meta http-equiv="Content-Type" content="text/html; charset=GB2312" />

      <meta name="generator" content="editplus" />

      <meta name="author" content="" />

      <meta name="keywords" content="" />

      <meta name="description" content="" />

     </head>

     <body>

     <!---加载进度条---->

    <div id="divShowLoading" style="position:absolute; display:none;">数据正在加载......</div>

    <script type="text/javascript">

    <!--

    function showProcess() 

         GetMsg();

    }

    var timerId=null;

    function GetMsg()

    {

        var msg = document.getElementById("divShowLoading");

        msg.style.left = (document.body.clientWidth - 220) / 2;

        msg.style.top = window.screen.height / 3 - 120;

        if(window.document.readyState != null && window.document.readyState != 'complete')

        {

            msg.style.display = "block";

        }   

        else

        {

            msg.style.display = "none";

            window.clearTimeout(timerId);

            return;

        }

        timerId=window.setTimeout('GetMsg()',1000);

    }

    showProcess(); 

    //-->

    </script> 

    <!---加载进度条---->

     </body>

    </html>

    /////////////////////////////////////////////////////////////////////

    <html>  

      <head>  

      <title>页面正在载入</title>  

          <script   language=javascript>

       <!--  

          document.write('<div   id=loadDiv   style="padding-top:   50;   padding-left:   50">'+  

                                        '页面正在载入,请等待<span   id="loading"></span></div>');  

          var   setInterval1   =   setInterval("loading.innerText   +=   '.'",   300);  

          var   setInterval2   =   setInterval("loading.innerText   =   ''",   15000);  

          function   window.onload()  

          {  

                hiddenDiv.style.display="";   //显示页面内容  

                loadDiv.removeNode(true);  

                clearInterval(setInterval1);  

                clearInterval(setInterval2);  

          }  

          //   --></script>  

      </head>  

       

      <body>  

      <div   id=hiddenDiv   style="display:none">  

      <img   src=http://www.csdn.net/images/homeimage/csdn.gif>  

          <!--   将你的网页所有内容都放在这个div之内即可   -->  

       

      </div> 

      </body>  

      </html>

     
     
     
     
     
     

     
     

    页面正在载入(js代码)

     

     
     <!---加载进度条---->
    <script type="text/javascript">
    <!--

    document.write('<div id=divShowLoading style="position:absolute; display:none;">'+   
                                        '页面正在载入,请等待<span></span></div>');   
     function showProcess()  
    {  
         GetMsg();

    var timerId=null;
    function GetMsg()
    {
        var msg = document.getElementById("divShowLoading");
        msg.style.left = (document.body.clientWidth - 220) / 2;
        msg.style.top = window.screen.height / 3 - 120;
        if(window.document.readyState != null && window.document.readyState != 'complete')
        {
            msg.style.display = "block";
        }    
        else
        {
            msg.style.display = "none";
            window.clearTimeout(timerId);
            return;
        }
        timerId=window.setTimeout('GetMsg()',1000);
    }
    showProcess(); 
    //-->
    </script>  
    <!---加载进度条---->
     


    ===================================================

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns=" http://www.w3.org/1999/xhtml">
     <head>
      <title> new document </title>
      <meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
      <meta name="generator" content="editplus" />
      <meta name="author" content="" />
      <meta name="keywords" content="" />
      <meta name="description" content="" />

     </head>

     <body>
     <!---加载进度条---->
    <div id="divShowLoading" style="position:absolute; display:none;">数据正在加载......</div>
    <script type="text/javascript">
    <!--

    function showProcess()  
    {  
         GetMsg();

    var timerId=null;
    function GetMsg()
    {
        var msg = document.getElementById("divShowLoading");
        msg.style.left = (document.body.clientWidth - 220) / 2;
        msg.style.top = window.screen.height / 3 - 120;
        if(window.document.readyState != null && window.document.readyState != 'complete')
        {
            msg.style.display = "block";
        }    
        else
        {
            msg.style.display = "none";
            window.clearTimeout(timerId);
            return;
        }
        timerId=window.setTimeout('GetMsg()',1000);
    }
    showProcess(); 
    //-->
    </script>  
    <!---加载进度条---->
     </body>
    </html>





    /////////////////////////////////////////////////////////////////////
    <html>   
      <head>   
      <title>页面正在载入</title>   
          <script   language=javascript>
       <!--   
          document.write('<div   id=loadDiv   style="padding-top:   50;   padding-left:   50">'+   
                                        '页面正在载入,请等待<span   id="loading"></span></div>');   
          var   setInterval1   =   setInterval("loading.innerText   +=   '.'",   300);   
          var   setInterval2   =   setInterval("loading.innerText   =   ''",   15000);   
          function   window.onload()   
          {   
                hiddenDiv.style.display="";   //显示页面内容   
                loadDiv.removeNode(true);   
                clearInterval(setInterval1);   
                clearInterval(setInterval2);   
          }   
          //   --></script>   
      </head>   
        
      <body>  


      <div   id=hiddenDiv   style="display:none">  


      <img   src=http://www.csdn.net/images/homeimage/csdn.gif>   
          <!--   将你的网页所有内容都放在这个div之内即可   -->   
        
      </div>  
     


      </body>   
      </html>

     
     
    http://developer.51cto.com/art/201205/338220.htm
     
     
  • 相关阅读:
    牛客网暑期ACM多校训练营(第九场)D
    有向图欧拉回路个数 BEST定理
    BZOJ 4894 有向图 外向生成树个数
    HDU 3364 高斯消元
    HDU 6437 最(大) 小费用最大流
    高斯消元 模板
    无向图生成树计数 基尔霍夫矩阵 SPOJ Highways
    HDU 6397 组合数学+容斥 母函数
    第三章 数据表示法
    第二章 二进制数值和记数系统
  • 原文地址:https://www.cnblogs.com/daishuguang/p/3520114.html
Copyright © 2011-2022 走看看