jquery书写的等待进度条

<!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>
        <title>jQuery简单进度</title>
        <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
        <meta http-equiv="description" content="this is my page">
        <meta http-equiv="content-type" content="text/html; charset=UTF-8">
        <style type="text/css">
            #load {
                width: 100%;
                height: 100%;
                position: absolute;
                top: 0;
                left: 0;
                background-color: #004400;
                opacity: 0.5;
                z-index: 300;
                display: none;
            } 
			#loadgif {
				position:fixed;
				top:50%;
				left:40%;
				width:300px;
				z-index:300;
				display:none;
            }
			span{
				color:#000000;
				font-size:18px;
				font-family:'microsoft YaHei';
				text-align:center;
				font-weight:bold;
			}
        </style>
        <script type="text/javascript" src="js/jquery-2.0.3.js">
        </script>
    </head>
    <body>
        <div style="width:100%;height:100px;background-color: #2B426B;">
            <button id="sendnowbut"> 立即发送</button>
        </div>
        <div id="load"></div>
		<div id="loadgif">
			<div><span>邮件发送中,请稍后<span id="11">.</span></span></div>
		</div>
        <script type="text/javascript">
            //点击立即发送开始遮罩
            $("#sendnowbut").click(function(){
                $("#load").css("display", "block");
				$("#loadgif").css("display", "block");
				setInterval("write()",1000);
				;
            });
            //关闭遮罩(根据后台返回值,关闭遮罩)
            $("#close_btn").click(function(){
                $("#load").css("display", "none");
				$("#loadgif").css("display", "none");
            })
			//写入省落号
			function write(){
				var length = $("#11").text().length+1;
				
				if(1==length){
					$("#11").html(".");
				}
				if(2==length){
					$("#11").html("..");
				}
				if(3==length){
					$("#11").html("...");
				}
				if(4==length){
					$("#11").html("....");
				}
				if(5==length){
					$("#11").html(".....");
				}
				if(6==length){
					$("#11").html("......");
				}
				if(7==length){
					$("#11").html(".");
				}
			}
        </script>
    </body>
</html>


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值