2 <SCRIPT src=tableDom.js
>
7 var table = document.getElementsByTagName(
"TABLE")[
0];
8 var refCg = document.getElementsByTagName(
"COLGROUP")[
0];
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
>
27 <td>100</td><td>200</td><td>300</td>
31 <table bgcolor=orange border
>
40 <td>100</td><td>200</td><td>300</td>