Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM td/th cellIndex property

td/th cellIndex property

td/th Object Reference td/th object


Definition and Usage

The cellIndex property can return the position of a cell within the collection of cells in a row.

Syntax

Return the cellIndex property:

tdObject.cellIndex

or

thObject.cellIndex

Tip: The cellIndex property has no default value.


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the cellIndex property


Example

Example

Pop up the position of the cell (cellIndex):

Runoob Tutorial(runoob.com)

    

        

        

    

Click to display the cell index Click to display the cell index

Try it »


td/th Object Reference td/th object