Ejemplo: javascript insertar fila al final de la tabla
<table id="ThisTable">
<tr><th>Head1</th><th>Head2</th><th>Head2</th></tr>
<tr><td>Data1</td><td>Data1</td><td>Data1</td></tr>
<tr><td>Data2</td><td>Data2</td><td>Data2</td></tr>
</table>
<script>
var table = document.getElementById("ThisTable");
var row = table.insertRow(-1);
<!-- Filling the new created cell -->
var cell1 = row.insertCell(0);
var cell2 = row.insertCell(1);
var cell3 = row.insertCell(2);
cell1.innerHTML = "NEW CELL1";
cell2.innerHTML = "NEW CELL2";
cell3.innerHTML = "NEW CELL3";
</script>
<!-- The (-1) indexes the last position of the table -->
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)