JSFiddle - React, Tailwind, and code Playground

HTML

<input type="button" value="Click Me" id="myButton" />

JavaScript

document.getElementById("myButton").onclick = function()
{
    window.alert("Hi there!");
}