JSFiddle - React, Tailwind, and code Playground
HTML
<div>
First name: <input type="text" name="fname" id="myTextBox" ><br>
<input type="button" name="submit" id="submit" value="Submit">
</div>
JavaScript
$("#myTextBox").change("input", function() {
alert("changed");
$("#myTextBox").attr("disabled", "disabled");
});
$("#submit").click("input", function() {
alert("changed");
$("#myTextBox").removeAttr("disabled", "disabled");
});