o=document.getElementById("tableID")
for(i=0;i<o.rows.length;i++)
{
for(j=0;j<o.rows[i].cells.length;j++)
{
alert(o.rows[i].cells[j].innerText)
}
}
for(i=0;i<o.rows.length;i++)
{
for(j=0;j<o.rows[i].cells.length;j++)
{
alert(o.rows[i].cells[j].innerText)
}
}
<SCRIPT LANGUAGE="JScript">
function numberCells() {
var count=0;
for (i=0; i < document.all.oTable.rows.length; i++) {
for (j=0; j < document.all.oTable.rows(i).cells.length; j++) {
document.all.oTable.rows(i).cells(j).innerText = count;
count++;
}
}
}
</SCRIPT>
<BODY onload="numberCells()">
<TABLE id=oTable border=1>
<TR><TH> </TH><TH> </TH><TH> </TH><TH> </TH></TR>
<TR><TD> </TD><TD> </TD><TD> </TD><TD> </TD></TR>
<TR><TD> </TD><TD> </TD><TD> </TD><TD> </TD></TR>
</TABLE>
</BODY>
</HTML>
<tr>
<td>1</td><td>2</td>
</tr>
</table>
<button onclick="find(0,1)">find</button>
<script language="javascript">
function find(row,cell){alert(tbl.rows[row].cells[cell].innerText);}
</script>