JSFiddle - React, Tailwind, and code Playground

HTML

<input value="press" id='a' type="button">

JavaScript

document.getElementById('a').onclick = function() { alert(1); }