Object: HTMLTableElement
Availability
|
BlackBerry®
Device Software version 4.6 or later
|
Extends
|
HTMLElement
|
The HTMLTableElement object represents a <table> element. You can use the methods to add or remove rows from a table.
The <table> element specifies the start of a table.
HTMLTableElement properties
|
Property name
|
Type
|
Description
|
Status
|
Support level
|
Availability
|
|
align
|
DOMString
|
Specifies the horizontal alignment of the table.
|
writable
|
DOM 2 HTML
|
4.6 or later
|
|
bgColor
|
DOMString
|
Specifies the background color for the table.
|
writable
|
DOM 2 HTML
|
4.6 or later
|
|
border
|
DOMString
|
Specifies the thickness of the border around the table
cells.
|
writable
|
DOM 2 HTML
|
4.6 or later
|
|
caption
|
HTMLTableCaptionElement
|
Specifies a pointer to the
<caption> element for the table.
When setting a value for this property, if you specify an
element that is not a
<caption> element, this property
throws a
HIERARCHY_REQUEST_ERR.
|
writable
|
DOM 2 HTML
|
4.6 or later
|
|
cellPadding
|
DOMString
|
Specifies the amount of white space, in pixels, to add
between cell content and its borders.
|
writable
|
DOM 2 HTML
|
4.6 or later
|
|
cellSpacing
|
DOMString
|
Specifies the amount of white space, in pixels, to add
between cells.
|
writable
|
DOM 2 HTML
|
4.6 or later
|
|
frame
|
DOMString
|
Specifies for which sides of the table the border will be
visible.
|
writable
|
DOM 2 HTML
|
4.6 or later
|
|
rows
|
HTMLCollection
|
Returns an index of the rows contained within the table,
starting at 0.
|
read only
|
DOM 2 HTML
|
4.6 or later
|
|
rules
|
DOMString
|
Specifies the location of rules in the table.
|
writable
|
DOM 2 HTML
|
4.6 or later
|
|
summary
|
DOMString
|
Specifies summary text that describes the contents of the
table.
|
writable
|
DOM 2 HTML
|
4.6 or later
|
|
tBodies
|
HTMLCollection
|
Returns an index of all the
<tbody> element in the table.
|
read only
|
DOM 2 HTML
|
4.6 or later
|
|
tFoot
|
HTMLTableCaptionElement
|
Specifies a pointer to the
<tfoot> element for the table.
When setting a value for this property, if you specify an
element that is not a
<tfoot> element, this property throws
a
HIERARCHY_REQUEST_ERR.
|
writable
|
DOM 2 HTML
|
4.6 or later
|
|
tHead
|
HTMLTableCaptionElement
|
Specifies a pointer to the
<thead> element for the table.
When setting a value for this property, if you specify an
element that is not a
<thead> element, this property throws
a
HIERARCHY_REQUEST_ERR.
|
writable
|
DOM 2 HTML
|
4.6 or later
|
|
width
|
DOMString
|
Specifies the width of the table, in pixels, or as a
percentage of the
BlackBerry® Browser window.
|
writable
|
DOM 2 HTML
|
4.6 or later
|
HTMLTableElement methods
|
Method name
|
Description
|
Support level
|
Availability
|
|
createCaption()
|
Creates a new table caption, if the table does not already
contain one.
|
DOM 2 HTML
|
4.6 or later
|
|
createTFoot()
|
Creates a new table footer, it the table does not already
contain one.
|
DOM 2 HTML
|
4.6 or later
|
|
createTHead()
|
Creates a new table header, if the table does not already
contain one.
|
DOM 2 HTML
|
4.6 or later
|
|
deleteCaption()
|
Removes the caption from the table, if one exists.
|
DOM 2 HTML
|
4.6 or later
|
|
deleteRow()
|
Removes the row at the given index position from the table.
|
DOM 2 HTML
|
4.6 or later
|
|
deleteTFoot()
|
Removes the footer from the table, if one exists.
|
DOM 2 HTML
|
4.6 or later
|
|
deleteTHead()
|
Removes the header from the table, if one exists.
|
DOM 2 HTML
|
4.6 or later
|
|
insertRow()
|
Inserts a new empty row into the table at the given index
position.
|
DOM 2 HTML
|
4.6 or later
|
Was this information helpful? Send us your comments.