gecko-dev/layout/reftests/table-dom/insertCols1.html
2009-06-28 11:47:11 -07:00

25 lines
472 B
HTML

<HEAD>
<SCRIPT src=tableDom.js>
</SCRIPT>
<SCRIPT>
function doIt() {
var table = document.getElementsByTagName("TABLE")[0];
var refCol = document.getElementsByTagName("COL")[0];
var col = document.createElement("COL", null);
col.width = 100;
table.insertBefore(col, refCol);
}
</SCRIPT>
</HEAD>
<BODY onload="doIt()">
<table bgcolor=orange border>
<col width=200>
<col width=300>
<tr>
<td>100</td><td>200</td><td>300</td>
</tr>
</table>
</BODY></HTML>