JSFiddle - React, Tailwind, and code Playground
HTML
<input id="txt0" type="text" class="textbox"/>
JavaScript
var t = document.getElementById("txt0");
t.focus();
t.attachEvent("onchange", function() { alert("changed"); });
<input id="txt0" type="text" class="textbox"/>
var t = document.getElementById("txt0");
t.focus();
t.attachEvent("onchange", function() { alert("changed"); });