JSFiddle - React, Tailwind, and code Playground
HTML
<input type="button" id="myButton" value="Click me"/>
<span id="myLabel"></span>
JavaScript
document.addEventListener("click", function(event){
//this is the event handler for the click event that will be used if you click any element in the page
document.getElementById('myLabel').innerText=event.target.id + " was clicked";
});