DOM Table Object
The Table object represents an HTML table.
For each <table>
tag in an HTML document, a Table object is created.
Collections
Collection | Description |
---|---|
cells[] |
Returns an array containing each cell in a table |
rows[] |
Returns an array containing each row in a table |
tBodies[] |
Returns an array containing each tbody in a table |
Properties
Property | Description |
---|---|
border |
Sets or returns the width of the table border |
caption |
Sets or returns the caption of a table |
cellPadding |
Sets or returns the amount of space between the cell border and cell content |
cellSpacing |
Sets or returns the amount of space between the cells in a table |
frame |
Sets or returns the outer-borders of a table |
rules |
Sets or returns the inner-borders of a table |
summary |
Sets or returns a description of a table |
tFoot |
Returns the TFoot object of a table |
tHead |
Returns the THead object of a table |
width |
Sets or returns the width of a table |
Methods
Method | Description |
---|---|
createCaption() |
Creates a caption element for a table |
createTFoot() |
Creates an empty tFoot element in a table |
createTHead() |
Creates an empty tHead element in a table |
deleteCaption() |
Deletes the caption element and its content from a table |
deleteRow() |
Deletes a row from a table |
deleteTFoot( ) |
Deletes the tFoot element and its content from a table |
deleteTHead() |
Deletes the tHead element and its content from a table |
insertRow() |
Inserts a new row in a table |
Standard Properties and Methods
This object also supports the standard properties and methods.
Standard Events
This object also supports the standard events.