DOM Objects
DOM Anchor
DOM Applet
DOM Area
DOM Base
DOM Basefont
DOM Body
DOM Button
DOM Checkbox
DOM Document
DOM Event
DOM FileUpload
DOM Form
DOM Frame
DOM Frameset
DOM Hidden
DOM History
DOM Iframe
DOM Image
DOM Link
DOM Location
DOM Meta
DOM Navigator
DOM Option
DOM Password
DOM Radio
DOM Reset
DOM Screen
DOM Select
DOM Style
DOM Submit
DOM Table
DOM TableData
DOM TableHeader
DOM TableRow
DOM Text
DOM Textarea
DOM Window

TableData Object

The TableData object represents an HTML td element.

The TableData object's properties, methods and events are described below:

N: Netscape (including Mozilla when N6 or higher), IE: Internet Explorer, W3C: World Wide Web Consortium (Internet Standard)

Properties

Syntax: object.property_name

Property Description N IE  W3C
abbr Sets or returns an abbreviated text for the table cell (for non-visual media such as speech or Braille)   6 Yes
accesskey Sets or returns the keyboard key to access the table cell   4 No
align Sets or returns the horizontal alignment of data within the table cell   4 Yes
axis Sets or returns a comma-delimited list of related table cells (categories)   6 Yes
background Sets or returns the background image for the table cell   4 No
bgColor Sets or returns the background color for the table cell   4 Yes
borderColor Sets or returns the border color of the table cell   4 No
cellIndex Returns the position of the cell in the cells collection of a row   4 Yes
ch Sets or returns the alignment character for the table cell   6 Yes
chOff Sets or returns the offset of alignment character for the table cell   6 Yes
colSpan Sets or returns the number of columns the table cell should span   4 Yes
disabled Sets or returns whether or not the table cell should be disabled   5.5 No
headers Sets or returns a list of space-separated header cell ids   6 Yes
height Sets or returns the height of the table cell   4 No
id Sets or returns the id of the table cell (In IE 4 this property is read-only)   4 No
innerHTML Sets or returns the HTML between the start and end tags of the table cell   4 No
innerText Sets or returns the text between the start and end tags of the table cell   4 No
noWrap Sets or returns a Boolean value indicating whether or not the browser automatically performs word wrap in the table cell   4 Yes
outerHTML Sets or returns the table data object and its content in HTML   4 No
outerText Sets or returns the text of the table data object   4 No
rowSpan Sets or returns the number of rows the table cell should span   4 Yes
scope     6 Yes
tabIndex Sets or returns the tab order for the table cell   4 No
vAlign Sets or returns how cell content are vertically aligned   4 Yes
width Sets or returns the width of the table cell   4 Yes

Methods

Syntax: object.method_name()

Method Description N IE W3C
blur() Removes focus from the table cell   4 No
click() Simulates a mouse-click on the table cell   4 No
focus() Sets focus on the table cell   4 No

Events

Syntax: object.event_name="someJavaScriptCode"

Event Description N IE W3C
onBlur Executes some code when the table cell loses focus   4  
onClick Executes some code when the user clicks on the table cell   4  
onFocus Executes some code when the table cell gets focus   4  
onSelectStart Executes some code when the table cell is selected   4