HTML DOM TableRow-objekti
- Previous page <thead>
- Next page <textarea>
TableRow object
The TableRow object represents the HTML <tr> element.
Access TableRow object
You can access the <tr> element using getElementById():
var x = document.getElementById("myTr");
Tip:You can also search the table's rows collection to access the <tr> element.
Create TableRow object
You can create a <tr> element using the document.createElement() method:
var x = document.createElement("TR");
TableRow object collection
Collection | Description |
---|---|
cells | Return the collection of all <td> or <th> elements in the table row. |
TableRow object properties
Attribute | Description |
---|---|
align |
Not supported in HTML5.Please use style.textAlign. Set or return the horizontal alignment of the content within the table row. |
bgColor |
Not supported in HTML5.Please use style.backgroundColor. Set or return the background color of the table row. |
ch |
Not supported in HTML5. Set or return the alignment character of the cell in the table row. |
chOff |
Not supported in HTML5. Set or return the horizontal offset of the ch attribute. |
height |
Not supported in HTML5.Please use style.height. Set or return the height of the table row. |
rowIndex | Return the position of the row in the row collection of the table. |
sectionRowIndex | Return the position of the row in the rows collection of tbody, thead, or tfoot. |
vAlign |
Not supported in HTML5.Please use style.verticalAlign. Set or return the vertical alignment of the content within the table row. |
TableRow object methods
Method | Description |
---|---|
deleteCell() | Delete a cell from the current table row. |
insertCell() | Insert a cell in the current table row. |
- Previous page <thead>
- Next page <textarea>