appendRowsExpand1.html (516B)
1 <HEAD> 2 <SCRIPT src=tableDom.js> 3 </SCRIPT> 4 <SCRIPT> 5 6 function doIt() { 7 var tbody = document.getElementsByTagName("TBODY")[0]; 8 var row = document.createElement("TR", null); 9 appendCell(row, 1, 1); 10 appendCell(row, 1, 1); 11 tbody.appendChild(row); 12 row = document.createElement("TR", null); 13 appendCell(row, 1, 1); 14 appendCell(row, 1, 1); 15 tbody.appendChild(row); 16 } 17 </SCRIPT> 18 </HEAD> 19 <BODY onload="doIt()"> 20 <table bgcolor=orange border> 21 <tr> 22 <td>c11</td><td>c12</td> 23 </tr> 24 </table> 25 </BODY></HTML>