bdakin | 2d87698 | 2006-03-16 18:54:35 +0000 | [diff] [blame] | 1 | <HEAD> |
| 2 | <SCRIPT src=tableDom.js> |
| 3 | </SCRIPT> |
| 4 | <SCRIPT> |
| 5 | |
| 6 | function doIt() { |
bdakin | 2d87698 | 2006-03-16 18:54:35 +0000 | [diff] [blame] | 7 | var refCol = document.getElementsByTagName("COL")[2]; |
| 8 | var col = document.createElement("COL", null); |
| 9 | col.width = 150; |
abarth@webkit.org | ec9b9d9 | 2010-07-15 21:39:27 +0000 | [diff] [blame] | 10 | refCol.parentNode.insertBefore(col, refCol); |
bdakin | 2d87698 | 2006-03-16 18:54:35 +0000 | [diff] [blame] | 11 | } |
| 12 | </SCRIPT> |
| 13 | </HEAD> |
| 14 | <BODY onload="doIt()"> |
| 15 | The 2 tables should look the same |
| 16 | <table bgcolor=orange border> |
| 17 | <col width=50> |
| 18 | <col width=100> |
| 19 | <col width=200> |
| 20 | <tr> |
| 21 | <td>50</td><td>100</td><td>150</td><td>200</td> |
| 22 | </tr> |
| 23 | </table> |
| 24 | |
| 25 | <BR> |
| 26 | <table bgcolor=orange border> |
| 27 | <col width=50> |
| 28 | <col width=100> |
| 29 | <col width=150> |
| 30 | <col width=200> |
| 31 | <tr> |
| 32 | <td>50</td><td>100</td><td>150</td><td>200</td> |
| 33 | </tr> |
| 34 | </table> |
| 35 | </BODY></HTML> |
| 36 | |