demo.html
2.82 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>求师问学</title>
<!--for-mobile-app-->
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="yes" name="apple-touch-fullscreen">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta content="telephone=no,email=no" name="format-detection">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<!--common-->
<script src="../jquery-1.8.3.min.js"></script>
</head>
<body class="bg-white">
<button onClick="loadingNoMsg()">loading(no-msg)</button>
<button onClick="loading()">loading</button>
<button onClick="success()">success</button>
<button onClick="error()">error</button>
<link href="AlerBottom.css" rel="stylesheet"/>
<script src="AlerBottom.js"></script>
<script>
function loading(){
$.AlerBottom({
status:'loading', //状态
msg:'保存中..', //文字0
duration:null,
callback:function(){
}
})
setTimeout(function(){
$.AlerBottom({
status:'loadingEnd', //显示或隐藏,默认为show
time:1000,
duration:null,
callback:function(){
$.AlerBottom({
status:'success',
msg:'保存成功,正在为您跳转(5)',
duration:null
})
var leftTime=5;
setInterval(function(){
if(leftTime==0){
//window.location.href="http://www.baidu.com";
}else{
leftTime--
$('#AlerBottom .info').text('保存成功,正在为您跳转('+leftTime+')');
}
},1000)
}
})
/*$.AlerBottom({
status:'success', //显示或隐藏,默认为show
time:0
})*/
},2000)
}
function loadingNoMsg(){
$.AlerBottom({
status:'loading', //状态
duration:null,
callback:function(){
}
})
setTimeout(function(){
$.AlerBottom({
status:'loadingEnd', //显示或隐藏,默认为show
time:1000,
duration:null,
callback:function(){
$.AlerBottom({
status:'success',
msg:'保存成功,正在为您跳转(5)',
duration:null
})
var leftTime=5;
setInterval(function(){
if(leftTime==0){
//window.location.href="http://www.baidu.com";
}else{
leftTime--
$('#AlerBottom .info').text('保存成功,正在为您跳转('+leftTime+')');
}
},1000)
}
})
/*$.AlerBottom({
status:'success', //显示或隐藏,默认为show
time:0
})*/
},2000)
}
function error(){
$.AlerBottom({
status:'error', //状态
msg:'保存失败保存失败保存失败保存失败保存失败保存失败保存失败保存失败保存失败保存失败保存失败保存失败保存失败保存失败!', //文字0
duration:null
})
}
function success(){
$.AlerBottom({
status:'success',
msg:'保存成功!',
duration:null
})
}
</script>
</body>
</html>