1 out of 3 rated this helpful - Rate this topic

HTMLTableElement Prototype

Defines the properties and methods inherited by objects in the HTMLTableElement prototype chain.

Syntax

HTML N/A
Scripting HTMLTableElement.prototype

Members Table

The following table lists the members exposed by the HTMLTableElement Constructor object.

Attributes/Properties

Attribute Property Description
ALIGN align Sets or retrieves a value that indicates the table alignment.
BGCOLOR bgColor Deprecated. Sets or retrieves the background color behind the object.
borderColorDark Sets or retrieves the color for one of the two colors used to draw the 3-D border of the object.
borderColorLight Sets or retrieves the color for one of the two colors used to draw the 3-D border of the object.
caption Retrieves the caption object of a table.
CELLPADDING cellPadding Sets or retrieves the amount of space between the border of the cell and the content of the cell.
CELLSPACING cellSpacing Sets or retrieves the amount of space between cells in a table.
COLS cols Sets or retrieves the number of columns in the table.
DATAFORMATAS dataFormatAs Sets or retrieves the rendering format for the data supplied to the object.
DATAPAGESIZE dataPageSize Sets or retrieves the number of records displayed in a table bound to a data source.
DATASRC dataSrc Sets or retrieves the source of the data for data binding.
FRAME frame Sets or retrieves the way the border frame around the table is displayed.
HEIGHT height Gets or sets the height of the object.
RULES rules Sets or retrieves which dividing lines (inner borders) are displayed.
SUMMARY summary Gets or sets a description and/or structure of the object.
tFoot Retrieves the tFoot object of the table.
tHead Retrieves the tHead object of the table.
WIDTH width Gets or sets the width of the object.

Collections

Collection Description
cells Retrieves a collection of all cells in the table row or in the entire table.
rows Retrieves a collection of tr (table row) objects from a table object.
tBodies Retrieves a collection of all tBody objects in the table. Objects in this collection are in source order.

Methods

Method Description
createCaption Creates an empty caption element in the table.
createTBody New for Windows Internet Explorer 9  Creates an empty tBody element in the table.
createTFoot Creates an empty tFoot element in the table.
createTHead Creates an empty tHead element in the table.
deleteCaption Deletes the caption element and its contents from the table.
deleteRow Removes the specified row (tr) from the element and from the rows collection.
deleteTFoot Deletes the tFoot element and its contents from the table.
deleteTHead Deletes the tHead element and its contents from the table.
firstPage Displays the first page of records in the data set to which the table is bound.
insertRow Creates a new row (tr) in the table, and adds the row to the rows collection.
lastPage Displays the last page of records in the data set to which the table is bound.
moveRow Moves a table row to a new position.
nextPage Displays the next page of records in the data set to which the table is bound.
previousPage Displays the previous page of records in the data set to which the table is bound.
refresh Refreshes the content of the table. This might be necessary after a call to a method such as removeRule, when the page does not automatically reflow.

Styles

Style attribute Style property Description
background background Gets or sets up to five separate background properties of the object.
border border Sets or retrieves the properties to draw around the object.
border-color borderColor Gets or sets the border color of the object.

Remarks

For more information on this and other DOM Prototypes , see Document Object Model Prototypes, Part 1: Introduction.

This prototype derives from the Element Constructor.

Applies To

TABLE

See Also

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ