I want to select the input fields' values in each column.
<table id="tablo">
<tr>
<td><input class="Name" type="text" /></td>
<td><input class="Age" type="text" /></td>
<td><input class="No" type="text" /></td>
</tr>
<tr>
<td><input class="Name" type="text" /></td>
<td><input class="Age" type="text" /></td>
<td><input class="No" type="text" /></td>
</tr>
<tr>
<td><input class="Name" type="text" /></td>
<td><input class="Age" type="text" /></td>
<td><input class="No" type="text" /></td>
</tr>
...
</table>
Then selecting each input value, I will create an object with these values and push the object in an array by looping through the selected inputs:
var arr= []
var obj = {
Name: jquery selector will come here,
Age: jquery selector will come here,
No: jquery selector will come here
}
arr.push(obj);
I've tried with jQuery's $.each() function, but I just only reach the columns.