I want to make everything I write in a textfield to be capital letters. As I write, not after losing focus.
How do I do this using jQuery?
I would use CSS for this.
Just add text-transform: uppercase
to your styling, and then on the server side you can convert it to uppercase.
input { text-transform: uppercase; }
$('input[type=text]').keyup(function() { $(this).val($(this).val().toUpperCase()); });
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