<!DOCTYPE html> <html> <body> Enter your name: <input type="text" id="inputBox" onkeyup="convertText()"> <script> function convertText() { var iBox = document.getElementById("inputBox"); iBox.value = iBox.value.toUpperCase(); } </script> </body> </html>
Reference: onkeyup Event
No comments:
Post a Comment