How to get all values ββof text inputs using jQuery?
I have a table with a column of pre-filled text inputs:
<table><tr><td>...</td><td><input class="unique_class" value="value1"/></td></tr>...
I gave each input field the same css class that only this element has (unique_class). I was hoping that I could use jQuery.val () to grab an array of all input values ββwith a css class in the table like this (I did something similar with checkbox values):
var values = $('.unique_class').val();
However, I only get the value of the last entry in the table. Is there a simple "quick" way to do this without iterating over the for-loop? Can this table be very large (more than 100 rows)?
+3
source to share
2 answers