JSFiddle - React, Tailwind, and code Playground

HTML

<p>A function is triggered when the user releases a key in the input field. The function transforms the character to upper case.</p>
Enter your name: <input type="text" id="fname" onkeyup="myFunction()">

JavaScript

$('#fname').on('input', function() {
        $(this).val($(this).val().toUpperCase());
    });