I have a page with some 13 textfields. I want to change the case of data in all the textfields to uppercase on click of a button. I can either user Jquery/javascript. I definitely don't want to use CSS-Text-transform property since it does not convert the case actually but just virtually.
Any suggestions as of how can I achieve this task using a single function ?
Thanks, Yeshwanth
You can use val
method:
$('#button').click(function(){
$('input[type=text]').val(function(i, oldVal){
return oldVal.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