Monday, March 30, 2015

Javascript Example: Convert Input Text To Uppercase Characters

This javascript example converts input text to uppercase characters.

<!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