esto te puede servir.
Código PHP:
function insertRow() {
var newTableCell;
var interestingTable = document.getElementById("personas");
var total = interestingTable.rows.length;
var newRow = interestingTable.insertRow(total);
what = "<input name='txtnombre' type='text' maxlength='100' style='width:100%;' value=''>";
newTableCell = newRow.insertCell(0);
newTableCell.innerHTML = what;
newTableCell.style.textAlign = "center";
newTableCell.style.padding = "3px;";
what = "<input name='txtapellido' type='text' maxlength='100' style='width:100%;' value=''>";
newTableCell = newRow.insertCell(1);
newTableCell.innerHTML = what;
newTableCell.style.textAlign = "center";
newTableCell.style.padding = "3px;";
}
Código HTML:
<table width="100%" align="center" border="0" cellspacing="2" cellpadding="2" class="TablaSimple" id="personas">
<tr align="center" style="font-weight:bold;">
<td width="50%">Nombre(s)</td>
<td width="50%">Apellido(s)</td>
</tr>
</table>
<input type="button" name="Button" value="Agregar más Personas" class="Botones" onClick="insertRow()" style="width:180px;">
saludos