Click to return to the DHTML, HTML     
deleteCell Method     deleteTFoot Method     DHTML Methods    
Web Workshop  |  DHTML, HTML & CSS

deleteRow Method


Deletes the specified row (TR) in the TABLE, and removes the row from the rows collection.

Syntax

object.deleteRow([iRowIndex])

Parameters

iRowIndexOptional. Integer that specifies the row to delete.

Return Value

No return value.

Remarks

If you delete a row from a TFOOT, TBODY, or THEAD, you also remove the row from the rows collection for the TABLE. Deleting a row in the TABLE also removes a row from the rows collection for the TBODY.

If you delete a row from a TBODY, TFOOT, or THEAD, iRowIndex must contain the sectionRowIndex of the TR. When deleting a row from the TABLE, iRowIndex must contain the rowIndex of the TR.

Example

This example uses the deleteRow method to delete the specified row (TR) in the TABLE.

myNewRow = document.all.myTable.deleteRow()

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:

TABLE, TBODY, TFOOT, THEAD

See Also

insertRow, rowIndex, rows, sectionRowIndex



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.