正在加载 效果的实现代码

 

 

<%@ 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 2014-10-22 13:56  itjeff  阅读(398)  评论(0编辑  收藏  举报

导航