JavaScript Program to Convert Text to Uppercase Using 'oninput' KeyEvent

Write a JavaScript program to convert text to uppercase using 'oninput' keyevent.

Source Code
    <title>Change text to Uppercase</title>
        function upperMe(txt) 
            document.getElementById('output').value = txt.toUpperCase();
<p>Enter lowercase letters for conversion to Uppercase</p>
Enter text here <input type="text" id="input" value="sample" oninput="upperMe(this.value)"><br><br>
String in UPPERCASE <input type="text" id="output" value="">

"Coding Hub - Learn to code" app now available on Google Play Store