mirror of
https://github.com/rn10950/RetroZilla.git
synced 2024-11-12 19:00:11 +01:00
31 lines
511 B
HTML
31 lines
511 B
HTML
<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>
|