JSFiddle - React, Tailwind, and code Playground
by kangismet
HTML
<input type ="button" value = "Klik" onclick = "count()"/>
<input id = "counting" type = "text" value = "0"/>
CSS
body {
margin:60px;
text-align:center;
}
#counting {
border:none;
outline:none;
}
JavaScript
var x = 0;
function count() {
x += 1;
document.getElementById( "counting" ).value = x;
}