2 <SCRIPT src=tableDom.js
>
7 var table = document.getElementsByTagName(
"TABLE")[
0];
8 var refCg = document.getElementsByTagName(
"COLGROUP")[
1];
9 var cg = document.createElement(
"COLGROUP", null);
10 var col = document.createElement(
"COL", null);
13 col = document.createElement(
"COL", null);
16 table.insertBefore(cg, refCg);
20 <BODY onload=
"doIt()">
21 The
2 tables should look the same
22 <table bgcolor=orange border
>
30 <td>50</td><td>100</td><td>150</td><td>200</td>
34 <table bgcolor=orange border
>
46 <td>50</td><td>100</td><td>150</td><td>200</td>