-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcountNum.html
51 lines (47 loc) · 1.52 KB
/
countNum.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="http://cdn.bootcss.com/animate.css/3.2.0/animate.min.css">
<link href="http://cdn.bootcss.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="css/buttons.css">
<script src="https://cdn.bootcss.com/jquery/2.2.0/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$(".button").click(function() {
$("p").hide(1000, function() {
if (!localStorage.countAll) {
localStorage.countAll = 0;
}
var objStorage = localStorage.countAll++;
document.getElementById('countspan').innerHTML = objStorage;
});
});
});
</script>
<style>
p {
font-family: arial, italics;
font-weight: bold;
color: #0ff;
}
#countspan {
color: red;
font-size: 60px;
margin: 10px, auto;
border: 0;
padding: 0;
/*display: block;*/
}
</style>
</head>
<body>
<div>
<button class="button button-royal button-circle button-giant"><i class="fa fa-plus"></i></button>
</div>
<!--<button type="button">点击计数</button>-->
<p>点一下,再点一下! 玩的开心哦 ~~~~O(∩_∩)O~~
</p>
<span id="countspan"></span>
</body>
</html>