There is a textfield : <input type="text" id="id" name="name" value="value" />
How to make any entered data to be in uppercase while it is typing ?
use keyup()
and toUpperCase()
..
$('#id').keyup(function(){
$(this).val($(this).val().toUpperCase());
});
or using DOMelement
$('#id').keyup(function(){
this.value=this.value.toUpperCase();
});
or using just CSS (no javascript at all)
#id{
text-transform:uppercase;
}
using CSS fiddle
fiddle here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With