<table id="myTable" style="border: 1px solid; border-color: black; border-collapse: collapse;">
<thead style="background-color: silver;">
<tr>
<th >1</th>
<th >2</th>
<th >3</th>
<th >4</th>
</tr>
</thead>
<tbody id="my_form">
<tr>
<td > <input type="text"> </td>
<td > <input type="text"></td>
<td ><input type="text"> </td>
<td ><input type="text"> </td>
</tr>
</tbody>
</table>
this is my html table and this is my js function to read it's contents
var mytable=document.getElementById('myTable');
var row_length=myTable.rows.length;
for(var i=1;i<row_length;i++)
{
var cells=change_key_table.rows.item(i).cells;
var cell_length=cells.length;
var content = cells.item(0).innerText;
alert(content);
}
this gives a blank string. innerText should not be used to read the value from the table? is there any specific method to read value from input tags? i read a lot of question in stack overflow regarding this but could find anything to solve the problem