Javascript Reference
Categories: TABLE

javascript TABLE cells

@March 15, 2008, 1:22 a.m.
cellsFirefox/Netscape/NN n/a IE 5(Win) Chrome/Safari/DOM n/a  

Read-only  

Returns a collection of all td elements inside the table. Entries in the array are in source code order of td elements. This property is more widely available for a tr element (one row at a time).

 
Example
 
var totCells = document.getElementById("myTable").cells.length;
 
Value

Reference to a cells collection object.

 
Default

Array of zero length.

This one works only with table row element on firefox. Internet Explorer goes further and has access to this table also with table element. Against wc3? Who cares, when it gives you easy access to all cells in table.
elon - 2011-05-25
Note: It is windows only!
javascript manual - 2009-10-14

Powered by Linode.