DHTML Methods
Deletes a specified row ( TR ) in a TABLE.
object.deleteRow ( [ iRowIndex ] )
iRowIndex |
Optional. The index of the row to delete. This index starts from 0 and is relative to all the rows contained inside the table, regardless of section parentage. |
No return value.
Deleting a row directly from a TABLE, or from a TFOOT, TBODY, or THEAD element within the TABLE removes the row from the rows collection for the TABLE.
Deleting a row from the TABLE removes a row from the rows collection for the TBODY. If the row is being deleted directly from the TABLE, iRowIndex must contain the rowIndex of the TR.
If the row is being deleted from a TBODY, TFOOT, or THEAD, iRowIndex must contain the sectionRowIndex of the TR.
The following example deletes the specified row ( TR ) in the TABLE.
myNewRow = document.all.myTable.deleteRow ( )
TABLE, TBODY, TFOOT, THEAD
insertRow, rows, rowIndex, sectionRowIndex