JSFiddle - React, Tailwind, and code Playground
by dmethvin
HTML
<input type="text" id="abc" value="abc" />
<input type="text" id="def" value="def" />
JavaScript
var text = document.getElementById("abc");
text.onkeypress = function(e){
this.value = "haha";
return false;
};
text.onchange = function(e){
alert("changed");
};