Skip to content Skip to sidebar Skip to footer

How To Get All Values Of Text Inputs With Jquery?

I have a table with a column of pre-populated text inputs:

Solution 1:

To get an array of values you should use $.map method:

var values = $('.unique_class').map(function() {
    return $(this).val();
}).get();

Also note, how you use .get method to convert jQuery array-like collection to actual array.

Post a Comment for "How To Get All Values Of Text Inputs With Jquery?"

...