A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/dom/HTMLTableElement/insertRow below:

insertRow ยท WebPlatform Docs

insertRow

Method of dom/HTMLTableElementdom/HTMLTableElement

Syntax
var object = object.insertRow(index);
Parameters index
Data-type
any

Integer that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.

Return Value

Returns an object of type DOM NodeDOM Node

Object

tr

null

Examples

This example uses the insertRow method to add a row to the table.

myNewRow = document.all.myTable.insertRow()
Notes Remarks

The preferred technique for inserting a row is to add the row at the end of the rows collection. It is faster to add a row at the end of a table than somewhere in the middle. To add a row at the end of the collection, specify the -1 value, or the length of the rows collection minus 1.

Syntax Standards information See also Related pages Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4