JSFiddle - React, Tailwind, and code Playground
by Joe
HTML
<input id="myInput" type="text" /><br />
<input id="myButton" type="submit" value="update" onclick()=/>
JavaScript
function click() {
document.getElementById('myButton').onclick = function() {
document.getElementById('myInput').readOnly = true;
}
}