Ver Mensaje Individual
  #2 (permalink)  
Antiguo 27/05/2009, 09:11
Avatar de colote
colote
 
Fecha de Ingreso: julio-2008
Ubicación: Rosario - Santa Fe - Argentina
Mensajes: 729
Antigüedad: 16 años, 7 meses
Puntos: 8
Respuesta: crear <tr></tr>

Prueba con esto:
Código javascript:
Ver original
  1. <script language='JavaScript'>
  2.  
  3. var contm=1;
  4. function agrega()
  5. {
  6. contm++;
  7. var indiceFilam=1;
  8. myNewRow = document.getElementById('tu_tabla').insertRow(-1);
  9. myNewRow.id=indiceFilam;
  10. myNewCell=myNewRow.insertCell(-1);
  11. myNewCell.innerHTML='<td><input type="text" size="4" name="cantp_'+contm+'" onkeypress="return tabular(event,this)"></td>';
  12. myNewCell=myNewRow.insertCell(-1);
  13. myNewCell.innerHTML='<td><input type="text" size="7" name="preciop_'+contm+'" onkeypress="return tabular(event,this)"></td>';
  14. myNewCell=myNewRow.insertCell(-1);
  15. myNewCell.innerHTML='<td><input type="text" size="8" name="sub_tot_'+contm+'" onkeypress="return tabular(event,this)"></td>';
  16. indiceFilam++;
  17. }
  18. </script>

y en tu form pones un boton de la forma :

<input type="button" name="boton" onclick="agrega()">

Espero te sirva


Saludos, Ricardo
__________________
Mail: [email protected]