RetroZilla/layout/html/tests/table/bugs/bug26178.html

31 lines
511 B
HTML
Raw Normal View History

2015-10-21 05:03:22 +02:00
<HEAD>
<SCRIPT>
function insertRow() {
tb = document.getElementById("tb");
fr = tb.childNodes[0];
nr = document.createElement("TR");
nc = document.createElement("TD");
nc.appendChild(document.createTextNode("second row"));
nr.appendChild(nc);
tb.insertBefore(nr,fr);
}
</SCRIPT>
</HEAD>
<BODY>
<TABLE>
<THEAD>
<TR>
<TD>The head</TD>
</TR>
</THEAD>
<TBODY ID="tb">
<TR>
<TD>First row</TD>
</TR>
</TBODY>
</TABLE>
<FORM>
<INPUT type=button value="insert" onclick="insertRow();">
</FORM>
</BODY>