Gustavo Reyes Gustavo Reyes - 1 year ago 103
jQuery Question

How can I change all input values to uppercase using Jquery?

I want to change all my form values to uppercase before the form is submitted.

So far I have this but it's not working.

$('#id-submit').click(function () {
var allInputs = $(":input");

Answer Source

Try like below,

$('input[type=text]').val (function () {
    return this.value.toUpperCase();

You should use input[type=text] instead of :input or input as I believe your intention are to operate on textbox only.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download