Ver Mensaje Individual
  #2 (permalink)  
Antiguo 08/11/2007, 03:34
Avatar de ZiTAL
ZiTAL
 
Fecha de Ingreso: marzo-2004
Ubicación: Bermio (Bizkaia)
Mensajes: 1.545
Antigüedad: 20 años, 2 meses
Puntos: 62
Re: hacer q input adquiera un valor

a ver si te sirve esto:
Código HTML:
<html>
 <head>
  <script type="text/javascript">
   function SeeInput(valor1,valor2,valor3)
    {
     valor1=parseInt(document.getElementById(valor1).value); //valor del input 1
     valor2=parseInt(document.getElementById(valor2).value); // valor del input 2    
     if(isNaN(valor1)==false || isNaN(valor2)==false) // isNaN significa Non alpha Numeric
      {
        document.getElementById(valor3).value=1; // asignamos valor al input 3
      }     
    }
  </script>
 </head>
 <body>
  <form>
   <input type="text" name="uno" id="uno" onchange="SeeInput('uno','dos','tres')" />
   <input type="text" name="dos" id="dos" onchange="SeeInput('uno','dos','tres')" />
   <input type="text" name="tres" id="tres" readonly />
   </form>
 </body>
</html> 
__________________
http://zital.no-ip.org
____________________

Euskerie ahuen eta bijotzan