-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathupvote.html
52 lines (44 loc) · 854 Bytes
/
upvote.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
52
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
.main {
margin: 100px auto;
text-align: center;
}
button {
padding: 20px;
background: transparent;
text-shadow: 1px 1px 1px #202020;
font-size: 18pt;
border: 1px solid lightblue;
color: lightblue;
}
</style>
</head>
<body>
<div class="main">
<button id="clickme">Click me: 0</button>
</div>
<script>
var button = document.getElementById("clickme"),
count = 0;
button.onclick = function() {
count += 1;
button.innerHTML = "Click me: " + count;
};
</script>
<div class="main">
<button id="clickme">Click me: 0</button>
</div>
<script>
var button = document.getElementById("clickme"),
count = 0;
button.onclick = function() {
count += 1;
button.innerHTML = "Click me: " + count;
};
</script>
</body>
</html>