insertCell method (tr)
Creates an empty cell element and inserts it into the current row element at the specified position.
This method provides a simpler way to create and insert a cell into a row than creating the cell with the createElement method and inserting it with the insertBefore method.
To remove a cell, use the deleteCell method.
You can find the related objects in the Supported by objects section below.
|Required in Firefox and Opera, optional in Internet Explorer, Google Chrome and Safari. Zero-based integer that specifies the position of the new cell in the cells collection of the current row.
Returns the inserted cell element.
Example HTML code 1:
This example illustrates the use of the insertCell method:
Did you find this example helpful?
User Contributed Comments