正在加载 效果的实现代码

 

 

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="mytest.aspx.cs" Inherits="CrazyAuchan.mytest" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <script src="Script/core/jquery-1.7.2.min.js"></script>
    <script type="text/javascript">
        $(function(){
            $("#btnok").click(function(){
                show();
            });

            $("#loading").click(function () {
                hide();
            });
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <input type="text" style="width:200px"/> <br />
        <input type="button" id="btnok" value="显示加载" onclick="close();"/>

        <div id="loading" style="position:absolute;top:0;left:0;height:100%; width:100%; z-index:999; background:#000 url(loaderc.gif) no-repeat center center; opacity:0.5; filter:alpha(opacity=60);font-size:14px;line-height:20px; display:none;"> 
            <p id="loading-one" style="color:#fff;position:absolute; top:50%; left:50%; margin:20px 0 0 -50px; padding:3px 10px;">

页面加载中...</p> 
        </div> 
<script type="text/javascript"> 
    function show()
    {
        $("#loading").show();
    }

 function hide(){ 
     $("#loading").hide();
 } 
 
</script>

    </div>
    </form>
</body>
</html>

 

 


 

posted on   itjeff  阅读(401)  评论(0编辑  收藏  举报

编辑推荐:
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· .NET10 - 预览版1新功能体验(一)

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示