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>
  • 相关阅读:
    Win10 x64 + CUDA 10.0 + cuDNN v7.5 + TensorFlow GPU 1.13 安装指南
    工作十一年总结
    Anaconda3 指南
    Win Linux 双系统安装指南
    OBS 录制视频 自己留存
    React Starter Kit 中文文档
    .NET Framework 系统版本支持表
    Hyper-V和其他虚拟机共存 【转】
    Docker入门03——Container
    Docker入门02——Dockerfile详解
  • 原文地址:https://www.cnblogs.com/tis100204/p/10328880.html
Copyright © 2011-2022 走看看