3 <script type=
"text/javascript">
6 var tbodyElem
= document
.getElementById("myTbody");
7 row0
= tbodyElem
.insertRow(0);
8 row0
.insertCell(0).appendChild(document
.createTextNode("Row_0"));
10 row4
= tbodyElem
.insertRow(tbodyElem
.rows
.length
);
11 row4
.insertCell(0).appendChild(document
.createTextNode("Row_4"));
13 row5
= tbodyElem
.insertRow(-1);
14 row5
.insertCell(0).appendChild(document
.createTextNode("Row_5"));
16 row6
= tbodyElem
.insertRow(100);
17 row6
.insertCell(0).appendChild(document
.createTextNode("Row_6"));
22 <body onLoad=
"addRows()">
23 <p>You should see a table with
6 rows, labeled
"Row_0",
"Row_1",
"Row_2",
"Row_3",
"Row_4",
"Row_5", from top to bottom.
</p>
25 <table border=
1 id=
"myTbody">