Ver Mensaje Individual
  #6 (permalink)  
Antiguo 25/07/2010, 12:35
Avatar de _cronos2
_cronos2
Colaborador
 
Fecha de Ingreso: junio-2010
Mensajes: 2.062
Antigüedad: 14 años, 9 meses
Puntos: 310
Respuesta: Ayuda formulario

Código Javascript:
Ver original
  1. var numero = 1;
  2. var donde = document.getElementById('donde');
  3. function crear(){
  4.  var input = document.createElement('input');
  5.  input.type = 'text'
  6.  input.setAttribute('id', numero);
  7.  input.setAttribute('name', 'carrera'+numero+'[]');
  8.  donde.appendChild(input);
  9.  numero++;
  10. }
Código HTML:
Ver original
  1. <div id='donde'></div>
  2. <input type='button' onclick='crear();' value='Nueva carrera' />

¿Algo como esto?
Saludos (:
__________________
" Getting older’s not been on my plans
but it’s never late, it’s never late enough for me to stay. "
Cigarettes - Russian Red