|
Subject:
|
reading table
|
|
Posted By:
|
darkhalf
|
Post Date:
|
10/5/2005 2:50:55 PM
|
Hi,
Say I have 2 tables, which don't have any identifier. How could I get the innerHTML value of the first <td> in the first <tr>? I'm tottaly lost in the document.all...
Thank you,
|
|
Reply By:
|
ChrisScott
|
Reply Date:
|
10/6/2005 11:37:49 AM
|
Hi darkhalf,
This should get you started...
var tables = document.getElementsByTagName("table");
if(tables.length != 0){
var table = tables.item(0);
var cells = table.getElementsByTagName("td");
if(cells.length != 0){
alert(cells.item(0).innerHTML);
}
}
HTH,
Chris
|