How to get input text value inside td
Hi,
I have an html table with 7 rows and 7 columns that contains input text. I need to get the value of each input and put in array.
I've done in this way, but it returns value undefined.
var table = document.getElementById('tabOrario');
var rowLength = table.rows.length;
for(var i=1; i<rowLength; i+=1)
{
var row = table.rows[i];
var cellLength = row.cells.length;
for(var y=1; y<7; y+=1)
{
ind++;
arrayTab[ind] = $(this).closest('tr').find("td:eq(y)') input").val();
console.log("ind ->"+ ind +" i:" +i+" y: "+y+" val ->"+ arrayTab[ind]);
}
}
Can someone helps me, please?
Thanks
Tegatti