| <script type="text/javascript"> |
| var tbodyElem = document.getElementById("myTbody"); |
| row0 = tbodyElem.insertRow(0); |
| row0.insertCell(0).appendChild(document.createTextNode("Row_0")); |
| row4 = tbodyElem.insertRow(tbodyElem.rows.length); |
| row4.insertCell(0).appendChild(document.createTextNode("Row_4")); |
| row5 = tbodyElem.insertRow(-1); |
| row5.insertCell(0).appendChild(document.createTextNode("Row_5")); |
| row6 = tbodyElem.insertRow(100); |
| row6.insertCell(0).appendChild(document.createTextNode("Row_6")); |
| <body onLoad="addRows()"> |
| <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> |
| <table border=1 id="myTbody"> |