The Table object represents an HTML table element.
The Table object's collections, properties, methods and events are described below:
Property |
Description |
N |
IE |
W3C |
accesskey |
Sets or returns the keyboard key to access the table |
|
4 |
No |
align |
Sets or returns the alignment of the table according to the
surrounding text |
6 |
4 |
Yes |
background |
Sets or returns the background image of the table |
|
4 |
No |
bgColor |
Sets or returns the background color of the table |
6 |
4 |
Yes |
border |
Sets or returns the width of the table border |
6 |
4 |
Yes |
borderColor |
Sets or returns the color of the table border |
|
5.5 |
No |
caption |
Sets or returns the caption of the table |
6 |
4 |
Yes |
cellPadding |
Sets or returns the amount of space space between the cell
border and cell content |
6 |
4 |
Yes |
cellSpacing |
Sets or returns the amount of space between cells in the
table |
6 |
4 |
Yes |
cols |
Sets or returns the number of columns in the
table |
|
4 |
No |
disabled |
Sets or returns whether or not the table should be disabled |
|
5.5 |
No |
frame |
Sets or returns which borders to render around the table.
Possible values are:
- void
- above
- below
- hsides
- vsides
- lhs
- rhs
- box
- border
|
6 |
4 |
Yes |
height |
Sets or returns the height of the table |
6 |
4 |
Yes |
id |
Sets or returns the id of the table (In IE 4 this
property is read-only) |
|
4 |
No |
rules |
Sets or returns which inner-borders to display. Possible
values are:
- none
- groups
- rows
- cols
- all
|
6 |
4 |
Yes |
summary |
Sets or returns a description of the table |
6 |
6 |
Yes |
tabIndex |
Sets or returns the tab order for the table |
|
4 |
No |
tFoot |
Returns the TFoot object of the table |
6 |
4 |
Yes |
tHead |
Returns the THead object of the table |
6 |
4 |
Yes |
width |
Sets or returns the width of the table |
6 |
4 |
Yes |
Method |
Description |
N |
IE |
W3C |
blur() |
Removes focus from the table |
|
4 |
No |
click() |
Simulates a mouse-click on the table |
|
4 |
No |
createCaption() |
Creates an empty caption element in the table |
6 |
4 |
Yes |
createTFoot() |
Creates an empty tFoot element in the table |
6 |
4 |
Yes |
createTHead() |
Creates an empty tHead element in the table |
6 |
4 |
Yes |
deleteCaption() |
Deletes the caption element and its content from the table |
6 |
4 |
Yes |
deleteRow([i]) |
Deletes the specified row (tr) from the table |
6 |
4 |
Yes |
deleteTFoot() |
Deletes the tFoot element and its content from the table |
6 |
4 |
Yes |
deleteTHead() |
Deletes the tHead element and its content from the table |
6 |
4 |
Yes |
focus() |
Sets focus on the table |
|
4 |
No |
insertRow([i]) |
Creates a new row in the table |
6 |
4 |
Yes |
moveRow(from,to) |
Moves a row to a new position |
|
5 |
No |
refresh() |
Refreshes the content of the table |
|
4 |
No |