-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
33 lines (32 loc) · 885 Bytes
/
index.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
<!DOCTYPE html>
<html>
<style>
.button {
border: none;
color: rgb(0, 255, 68);
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
}
.button:hover {
background-color: #ff403d;
color: rgb(76, 54, 183);
}
.button1 {background-color: #4CAF50;} /* Green */
</style>
<body>
<button class=button button1, onclick="onClick()">Try it</button>
<script>
var clicks = 0;
function onClick() {
clicks += 1;
document.getElementById("clicks").innerHTML = clicks;
};
</script>
<p>Clicks: <a id="clicks">0</a></p>
</body>
</html>