CAPTION , THEAD , and TFOOT
elements may exist in a table. Therefore, if one exists, and the
createTHead() or createTFoot() method is called, the method returns the
existing THead or TFoot element. See the TABLE element definition in HTML
4.0.
See also the Document Object Model (DOM) Level 2 Specification.
| Modifier and Type | Method and Description |
|---|---|
| public HTMLElement | Returns: ACAPTION element.Create a new table caption object or return an existing one. |
| public HTMLElement | Returns: A footer element (TFOOT ).Create a table footer row or return an existing one. |
| public HTMLElement | Returns: A new table header element (THEAD ).Create a table header row or return an existing one. |
| public void | |
| public void | deleteRow(int
The index of the row to be deleted. This index starts
from 0 and is relative to all the rows contained inside the table,
regardless of section parentage. index)Delete a table row. |
| public void | |
| public void | |
| public String | |
| public String | |
| public String | |
| public HTMLTableCaptionElement | |
| public String | |
| public String | |
| public String | |
| public HTMLCollection | getRows()
Returns a collection of all the rows in the table, including all in
|
| public String | |
| public String | |
| public HTMLCollection | |
| public HTMLTableSectionElement | |
| public HTMLTableSectionElement | |
| public String | |
| public HTMLElement | Returns: The newly created row.The row number where to insert a new row. This index
starts from 0 and is relative to all the rows contained inside the
table, regardless of section parentage. index)Insert a new empty row in the table. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void |
| createCaption | back to summary |
|---|---|
| public HTMLElement createCaption() Create a new table caption object or return an existing one.
| |
| createTFoot | back to summary |
|---|---|
| public HTMLElement createTFoot() Create a table footer row or return an existing one.
| |
| createTHead | back to summary |
|---|---|
| public HTMLElement createTHead() Create a table header row or return an existing one.
| |
| deleteCaption | back to summary |
|---|---|
| public void deleteCaption() Delete the table caption, if one exists. | |
| deleteRow | back to summary |
|---|---|
| public void deleteRow(int index) throws DOMException Delete a table row.
| |
| deleteTFoot | back to summary |
|---|---|
| public void deleteTFoot() Delete the footer from the table, if one exists. | |
| deleteTHead | back to summary |
|---|---|
| public void deleteTHead() Delete the header from the table, if one exists. | |
| getAlign | back to summary |
|---|---|
| public String getAlign() Specifies the table's position with respect to the rest of the document. See the align attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0. | |
| getBgColor | back to summary |
|---|---|
| public String getBgColor() Cell background color. See the bgcolor attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0. | |
| getBorder | back to summary |
|---|---|
| public String getBorder() The width of the border around the table. See the border attribute definition in HTML 4.0. | |
| getCaption | back to summary |
|---|---|
| public HTMLTableCaptionElement getCaption() Returns the table's | |
| getCellPadding | back to summary |
|---|---|
| public String getCellPadding() Specifies the horizontal and vertical space between cell content and cell borders. See the cellpadding attribute definition in HTML 4.0. | |
| getCellSpacing | back to summary |
|---|---|
| public String getCellSpacing() Specifies the horizontal and vertical separation between cells. See the cellspacing attribute definition in HTML 4.0. | |
| getFrame | back to summary |
|---|---|
| public String getFrame() Specifies which external table borders to render. See the frame attribute definition in HTML 4.0. | |
| getRows | back to summary |
|---|---|
| public HTMLCollection getRows() Returns a collection of all the rows in the table, including all in
| |
| getRules | back to summary |
|---|---|
| public String getRules() Specifies which internal table borders to render. See the rules attribute definition in HTML 4.0. | |
| getSummary | back to summary |
|---|---|
| public String getSummary() Description about the purpose or structure of a table. See the summary attribute definition in HTML 4.0. | |
| getTBodies | back to summary |
|---|---|
| public HTMLCollection getTBodies() Returns a collection of the defined table bodies. | |
| getTFoot | back to summary |
|---|---|
| public HTMLTableSectionElement getTFoot() Returns the table's | |
| getTHead | back to summary |
|---|---|
| public HTMLTableSectionElement getTHead() Returns the table's | |
| getWidth | back to summary |
|---|---|
| public String getWidth() Specifies the desired table width. See the width attribute definition in HTML 4.0. | |
| insertRow | back to summary |
|---|---|
| public HTMLElement insertRow(int index) throws DOMException Insert a new empty row in the table. The new row is inserted
immediately before and in the same section as the current
| |
| setAlign | back to summary |
|---|---|
| public void setAlign(String align) | |
| setBgColor | back to summary |
|---|---|
| public void setBgColor(String bgColor) | |
| setBorder | back to summary |
|---|---|
| public void setBorder(String border) | |
| setCaption | back to summary |
|---|---|
| public void setCaption(HTMLTableCaptionElement caption) | |
| setCellPadding | back to summary |
|---|---|
| public void setCellPadding(String cellPadding) | |
| setCellSpacing | back to summary |
|---|---|
| public void setCellSpacing(String cellSpacing) | |
| setFrame | back to summary |
|---|---|
| public void setFrame(String frame) | |
| setRules | back to summary |
|---|---|
| public void setRules(String rules) | |
| setSummary | back to summary |
|---|---|
| public void setSummary(String summary) | |
| setTFoot | back to summary |
|---|---|
| public void setTFoot(HTMLTableSectionElement tFoot) | |
| setTHead | back to summary |
|---|---|
| public void setTHead(HTMLTableSectionElement tHead) | |
| setWidth | back to summary |
|---|---|
| public void setWidth(String width) | |