Object: HTMLTableSectionElement
Availability
|
BlackBerry®
Device Software version 4.6 or later
|
Extends
|
HTMLElement
|
The HTMLTableSectionElement object represents a <tbody>, <tfoot>, or <thead> element in an HTML document.
The <tbody> element specifies a table body section. The <tfoot> and <thead> elements specify the table footer and table header, respectively.
HTMLTableSectionElement properties
Property name
|
Type
|
Description
|
Status
|
Availability
|
align
|
String
|
Specifies the horizontal alignment of the cell data.
|
writable
|
4.6 or later
|
ch
|
String
|
Specifies the alignment character for cells in a column.
|
writable
|
4.6 or later
|
chOff
|
String
|
Specifies the distance the distance between the alignment character and the first adjacent character.
|
writable
|
4.6 or later
|
rows
|
HTMLCollection
|
Returns an index of the rows contained within the table section, starting at 0.
|
read only
|
4.6 or later
|
vAlign
|
String
|
Specifies the vertical alignment of the content within the table cell.
|
writable
|
4.6 or later
|
HTMLTableSectionElement
methods
Method name
|
Description
|
Availability
|
deleteRow()
|
Removes the row at the given index position from the table section.
|
4.6 or later
|
insertRow()
|
Inserts a new empty row into the table section at the given index position.
|
4.6 or later
|
Method: HTMLTableSectionElement.deleteRow()
Availability
|
BlackBerry®
Device Software version 4.6 or later
|
The deleteRow() method removes the row at the given index position from the table section.
Syntax
HTMLTableSectionElement.deleteRow( index )
Parameters
Parameter
|
Type
|
Description
|
index
|
int
|
The index position of the row to remove from the table section.
If index has a value of -1, or is equal to the number of rows in the table section, the last row in the section is removed.
|
Exceptions
Exception
|
Description
|
INDEX_SIZE_ERR
|
This error is thrown if index exceeds the number of rows in the table section, or has a negative value other than -1.
|
Method: HTMLTableSectionElement.insertRow()
Availability
|
BlackBerry®
Device Software version 4.6 or later
|
The insertRow() method inserts a new empty row into the table section at the given index position.
Once the new row is added, you can populate it with table cells using
HTMLTableRowElement.insertCell().
Syntax
HTMLTableSectionElement.insertRow( index )
Parameters
Parameter
|
Type
|
Description
|
index
|
int
|
The index position at which to insert the new row in the table section.
If index has a value of -1, or is equal to the number of rows in the table section, the new row is added to the end of the section.
|
Return values
Returns the newly added row.
Exceptions
Exception
|
Description
|
INDEX_SIZE_ERR
|
This error is thrown if index exceeds the number of rows in the table section, or has a negative value other than -1.
|
Was this information helpful? Send us your comments.