Ver Mensaje Individual
  #3 (permalink)  
Antiguo 20/07/2015, 14:33
mariomb19
 
Fecha de Ingreso: mayo-2012
Ubicación: Caracas
Mensajes: 53
Antigüedad: 12 años
Puntos: 1
Respuesta: Cambiar un input mediane otro input, que se repite

Hola muchas gracias por tu respuesta pero quede igual, el ejemplo que me diste no hace nada

Código HTML:
Ver original
  1. <!DOCTYPE html>
  2.  
  3.     <head>
  4.         <title>TODO supply a title</title>
  5.         <meta charset="UTF-8">
  6.         <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7.     </head>
  8.  
  9.  
  10. <input type = "text" class = "ingresa" />
  11. <input type = "text" class = "ingresa" />
  12. <input type = "text" class = "ingresa" />
  13.  <br><br>
  14. <input type = "text" class = "guarda" disabled />
  15. <input type = "text" class = "guarda" disabled />
  16. <input type = "text" class = "guarda" disabled />
  17.    
  18. </body>
  19. </html>

Código Javascript:
Ver original
  1. [].forEach.call(document.querySelectorAll(".ingresa"), function(element, index){
  2.     element.addEventListener("input", function(){
  3.         document.querySelectorAll(".guarda")[index].value = this.value*6;
  4.     }, false);
  5. });