JQuery change to uppercase
Change text to UpperCase using jQuery.In this article,I will explain
How to Change text to UpperCase using jQuery.We are using following JavaScript code to Change text to UpperCase
using jQuery.
The keyup() method is used to Bind an event handler to the "keyup" JavaScript event, or trigger that event on an element and
The toUpperCase() method converts a string to uppercase letters.
You can use javascript toUpperCase() method
to Change text to UpperCase
using jQuery.In the following code we have called the keyup event in the JavaScript to
Change lowercase chars to uppercase. This function would be called when any
user enters char on the textbox .The javascript code below shows how to Change text to UpperCase using jQuery.
Example: Change text to UpperCase using jQuery
<!DOCTYPE html>
<html>
<title>JQuery change to uppercase</title>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<form>
<input id="name" type="text" />
</form>
<script>
$('#name').keyup(function(event) {
this.value = this.value.toUpperCase();
});
</script>
</body>
</html>