zoukankan      html  css  js  c++  java
  • 页面在加载时,等时候的页面(loading……)

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="Musi.进度条页面.WebForm1" %>

    <!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 runat="server">
        <title></title>

        <script src="../Js/jquery-1.4.1.js" type="text/javascript"></script>

        <script src="../Js/jquery-1.4.1-vsdoc.js" type="text/javascript"></script>

        <script language="JavaScript" type="text/javascript">

    <script language="JavaScript" type="text/javascript">
            var t_id = setInterval(animate, 20);
            var pos = 0; var dir = 2; var len = 0;
            function animate() {
                var elem = document.getElementById('progress');
                if (elem != null) {
                    if (pos == 0) len += dir;
                    if (len > 32 || pos > 79) pos += dir;
                    if (pos > 79) len -= dir;
                    if (pos > 79 && len == 0) pos = 0;
                    elem.style.left = pos;
                    elem.style.width = len;
                }
            }
            function remove_loading() {
                this.clearInterval(t_id);
                var targelem = document.getElementById('loader_container');
                targelem.style.display = 'none';
                targelem.style.visibility = 'hidden';
            }


            function hideLoading() {
                // $("#btnOk").removeAttr("disabled");
                $("#loader_container").css("display", "none");
                return true;
            }
            function show() {
                $("#loader_container").css("display", "block");
                return true;
            }
           
        </script>

    <style type="text/css">
            #loader_container
            {
                float: left;
               
                left: 532px;
                text-align: center;
                position: absolute;
                top: 300px;
                12%;          
                height: 53px;
              
            }
            #loader
            {
                font-family: Tahoma, Helvetica, sans;
                font-size: 11.5px;
                color: #000000;
                background-color: #FFFFFF;
                padding: 10px 0 16px 0;
                margin: 0 auto;
                display: block;
                130px;
                border: 1px solid #5a667b;
                text-align: left;
                z-index: 2;
                height: 26px;
            }
            #progress
            {
                height: 5px;
                font-size: 1px;
                1px;
                position: relative;
                top: 1px;
                left: 0px;
                background-color: #8894a8;
            }
            #loader_bg
            {
                background-color: #e4e7eb;
                position: relative;
                top: 8px;
                left: 8px;
                height: 7px;
                113px;
                font-size: 1px;
            }
            #load
            {
                top: 300px;
                left: 500px;
            }
          
        </style>
    </head>
    <body onload="hideLoading()">
        <form id="form1" runat="server">
        <div style="text-align: center;">
            <div id="loader_container">
                <div id="loader">
                    <div style="text-align: center;">
                        页面正在加载中 ...</div>
                    <div id="loader_bg">
                        <div id="progress">
                        </div>
                    </div>
                </div>
            </div>
            <div style="top: 400px; height: 539px;">
                <input id="Button2" type="button" value="button" onclick="show()" />
                <asp:Button ID="btnOk" runat="server" OnClientClick="show()" OnClick="Button1_Click"
                    Text="Button" />
            </div>
        </div>
       
        </form>
    </body>
    </html>
    这是页面也加载效果,比我上回写的那个要好些,这些我后来改进的。



      protected void Button1_Click(object sender, EventArgs e)
            {
                          System.Threading.Thread.Sleep(2000);
            }
  • 相关阅读:
    SQL Server 2008 Windows身份验证改为混合模式身份验证
    SQL中给datetime类型变量赋值
    结婚三周年特此@Mark一下
    搞笑的【国庆出游五大注意事项】
    利用SVNListParentPath增加http浏览仓库根目录的功能
    如果年底买不到CC就出手小指吧
    svn备份策略
    缺乏配置管理造成的常见问题
    高速公路开车必看的注意事项
    山雨欲来踏上Java学习之路
  • 原文地址:https://www.cnblogs.com/wangsx/p/1999250.html
Copyright © 2011-2022 走看看