Ver Mensaje Individual
  #2 (permalink)  
Antiguo 23/01/2015, 10:16
Avatar de Alexis88
Alexis88
Philosopher
 
Fecha de Ingreso: noviembre-2011
Ubicación: Tacna, Perú
Mensajes: 5.552
Antigüedad: 12 años, 5 meses
Puntos: 977
Respuesta: Copiarvalor de un select a varios campo texto

Bienvenida a FDW

Así como asignas el valor a un campo, puedes asignarlo a N campos. Solo sigue la misma metodología que estás empleando.

Código HTML:
Ver original
  1. <input type = "text" id = "a" />
  2. <input type = "text" id = "b" />
  3. <input type = "text" id = "c" />
  4. <input type = "text" id = "d" />
  5. <input type = "text" id = "e" />

Código Javascript:
Ver original
  1. function fAgrega(){
  2.     var valor = document.getElementById("select").value;
  3.  
  4.     document.getElementById("a").value = valor;
  5.     document.getElementById("b").value = valor;
  6.     document.getElementById("c").value = valor;
  7.     document.getElementById("d").value = valor;
  8.     document.getElementById("e").value = valor;
  9. }

Saludos
__________________
«Juro por mi vida y mi amor por ella, que jamás viviré para el provecho de otro hombre, ni le pediré a otro hombre que viva para el mío».

Ayn Rand