Change text box value in uppercase using jQuery

We can bind this functionality with text box KeyUp event. So, when type anything this code will change the text box value in uppercase with each keystroke.

Code Snippet:-

<input type="text" id="variable" name="variable" />
<script type="text/javascript">
$(document).ready(function() {
	$('#variable').keyup(function() {
		$(this).val($(this).val().toUpperCase());
	});
});
</script>

, , ,


  1. No comments yet.
(will not be published)

 


Submit Comment
Subscribe to comments feed
  1. No trackbacks yet.