2 <SCRIPT src=tableDom.js
>
7 var table = document.getElementsByTagName(
"TABLE")[
0];
8 var tbody = document.createElement(
"TBODY", null);
9 var row = document.createElement(
"TR", null);
10 appendCell(row,
2,
1);
11 appendCell(row,
1,
1);
12 tbody.appendChild(row);
13 var refTbody = document.getElementsByTagName(
"TBODY")[
0];
14 table.insertBefore(tbody, refTbody);
18 <BODY onload=
"doIt()">
19 The
2 tables should look the same
20 <table bgcolor=orange border
>
23 <td>c11
</td><td>c12
</td>
28 <table bgcolor=orange border
>
31 <td rowspan=
2>X1
</td><td>X2
</td>
36 <td>c11
</td><td>c12
</td>