I have a table as follows:
<table id="mytable">
<tr id='id1'>
<td>Cell A</td>
<td >Cell B</td>
<td >Cell C</td>
</tr>
<tr id='id2'>
<td >Cell D</td>
<td>Cell E</td>
<td>Cell F</td>
</tr>
</table>
I know the row id id1
I want read all the cells I mean <td>
of that particular using table id and row id. That means I need to read values Cell A, Cell B, Cell C
Note: use Javascript only
Here is the demo fiddle.
HTML
<table id="mytable">
<tr id='id1'>
<td>Cell A</td>
<td >Cell B</td>
<td >Cell C</td>
</tr>
<tr id='id2'>
<td >Cell D</td>
<td>Cell E</td>
<td>Cell F</td>
</tr>
</table>
JS
var tr = document.getElementById('id1');
var td = tr.getElementsByTagName("td");
for(var i=0;i<td.length;i++) {
console.log(td[i].innerHTML);
}
Hope this is what you need!