JSFiddle - React, Tailwind, and code Playground
HTML
<input value="press" id='a' type="button">
JavaScript
document.getElementById('a').onclick = function() { alert(1); }
<input value="press" id='a' type="button">
document.getElementById('a').onclick = function() { alert(1); }