zoukankan      html  css  js  c++  java
  • 加载等待并跳转页面

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
        <form name=loading>
            <p>
                <!--进度条加载时上面那行的提示-->
                <font color="#0066ff" size="2" face="Arial">载入中,请稍等...</font><br>
                <!--进度条-->
                <input type=text name=chart size=46 style="font-family:Arial; font-weight:bolder; color:#0066ff; padding:0px; border-style:none;">
                <br>
                <!--进度条加载的进度-->
                <input type=text name=percent size=47 style="color:#0066ff; text-align:center; border-medium; border-style:none;">
            </p>
        </form>
    </body>
    </html>
    <script>
        var bar = 0; //初始变量的值
        var line = "||"; //定义的进度条
        var amount = "||"; //定义的进度条
        count();
        function count(){
            bar = bar + 2; //变量每次加2
            amount = amount + line; //两个进度条进行的拼接
            document.loading.chart.value = amount; //进度条
            document.loading.percent.value = bar + "%"; //进度条显示的进度,也是拼接
                if(bar < 99){
                    setTimeout("count()", 100); //只要变量小于99,每100毫秒循环调用一次
                } else{
                    window.location = "夜空下的星星.html"; //进度条加载完成(100%时)跳转页面
                }
        }
    </script>
  • 相关阅读:
    ViewState
    Insert
    Copy: 了解SQL Server锁争用:NOLOCK 和 ROWLOCK 的秘密
    How to check number of Active connections in SQL server?
    (转)IIS6上启用Gzip压缩(HTTP压缩) 详解
    Reference (SQL Server 2005自动异机备份)
    [转] ios中KeyChain用途
    ios 中的事件
    unity3d 鼠标事件穿透GUI界面的问题
    Unity StartCoroutine注意的问题
  • 原文地址:https://www.cnblogs.com/tis100204/p/10328880.html
Copyright © 2011-2022 走看看