Ver Mensaje Individual
  #4 (permalink)  
Antiguo 07/06/2010, 10:29
Avatar de _cronos2
_cronos2
Colaborador
 
Fecha de Ingreso: junio-2010
Mensajes: 2.062
Antigüedad: 13 años, 10 meses
Puntos: 310
Respuesta: Problema al insertar un tag table por medio de un innerhtml

En vez de hacerlo clonándolo ¿no se podrá hacer con un bucle?

Código Javascript:
Ver original
  1. function formu(n){
  2.  for(i=1; i<n; i++){
  3.   document.write('<form id="a'+i+'" method="post" action="mipagina.htm">');
  4.   document.write('Nombre:<input type="text" id="b'+i+'" />');
  5.   document.write('Edad<input type="text" id="c'+i+'" />');
  6.   document.write('<input type="submit" value="Enviar" />');
  7.   //...
  8.  }
  9. }

Código HTML:
Ver original
  1. <body onload='formu(10);'>

Saludos (: