JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" id="fname" onchange="myFunction()">
JavaScript
function myFunction() {
var x = document.getElementById("fname");
x.value() = x.value.toUpperCase();
}
<input type="text" id="fname" onchange="myFunction()">
function myFunction() {
var x = document.getElementById("fname");
x.value() = x.value.toUpperCase();
}