JSFiddle - React, Tailwind, and code Playground
by markmark
HTML
<!DOCTYPE HTML>
<html>
<head>
<title>
clicked button in JavaScript
</title>
</head>
<body style = "text-align:center;">
<header>
<h1> Clicker costumer queue identify button</h1>
</header>
<center>
<button id="c" class="button" onclick="uppass()" style=" font-size: 16px; margin: 0 10px;"> Common </button>
<button id="f" type="button" onclick="uppass()" style=" font-size: 16px; margin: 0 10px;"> Fast </button>
<button id="p" type="button" onclick="uppass()" style=" font-size: 16px; margin: 0 10px;"> Priority </button>
</center>
<h5>Sua senha Ă©:</h5><h2 id="newclient" style="font-size: 12px; display: inline-block; padding-left: 20px;">0</h5>
</body>
</html>
JavaScript
function uppass () {
var element = document.getElementById("newclient");
var value = element.innerHTML;
++value;
console.log(value);
document.getElementById("newclient").innerHTML = value;
}