deleteRow Method

DHTML, HTML, & CSS

 
Click to return to the DHTML, HTML & CSS home page    
deleteCell Method     deleteTFoot Method     DHTML Methods    

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:
Version data is listed when the mouse hovers over a link, or the link has focus.

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!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.