javascript TBODY insertRow( )
insertRow( ) | Firefox/Netscape/NN 6 IE 4(Win) Chrome/Safari/DOM 1 |
insertRow(index) |
|
Inserts a tr element nested within the current tbody, tfoot, or thead element. The integer parameter points to the zero-based index in the rows collection where the new row should go, but in IE you can also use the shortcut value of -1 to append the row to the end of the collection. Adding the row inserts an empty element, to which you add cells via the insertCell( ) method. Unfortunately, scripting the addition of table rows and cells in IE for the Macintosh (including Version 5.1) is very broken, yielding elephantine row and cell dimensions. For nonnested tables, you might be able to get away with regular document tree node creation and insertion instead of the table section object convenience methods. |
|
Parameters | |
|
|
Returned Value | |
Reference to the newly inserted row. |
Powered by Linode.