COUNTER
IT COUNTS
by mrcrazypants987
HTML
<body>
<h1 style="font-size:300%;" id="count" >0</h1>
<button type="button" onclick="addcount()">add</button>
<button type="button" onclick="subtractcount()">subtract</button>
<button type="button" onclick="reset()">reset</button>
<script>
var count=0;
function addcount(){
document.getElementById("count").innerHTML = count + 1;count++
}
function subtractcount(){
document.getElementById("count").innerHTML = count - 1;count--
}
function reset(){
document.getElementById("count").innerHTML = count - count;count =0
}
</script>
</body>
CSS
button {
border-radius:10px;
border: black;
color: black;
padding: 15px 32px;
text-align: center;
display: inline-block;
font-size: 16px;