JSFiddle - React, Tailwind, and code Playground
HTML
Enter your name: <input type="text" id="fname"/>
<br/>
<span id="mySpan" name="test"></span>
JavaScript
document.getElementById("fname").onkeyup = function() {
document.getElementsById("test").innerHTML = this.value.toUpperCase();
}