<table id="table">
<tr>
<td>1</td>
</tr>
<tr>
<td>1</td>
</tr>
<tr>
<td>1</td>
</tr>
<tr>
<td>1</td>
</tr>
</table>
<script>
list= document.getElementById("table").getElementsByTagName("tr");
for (var i=0; i< list.length; ++i)
{
list[i].getElementsByTagName("td")[0].innerHTML="2";
};
</script>