Ver Mensaje Individual
  #2 (permalink)  
Antiguo 16/11/2003, 13:22
Avatar de JavierB
JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 23 años, 2 meses
Puntos: 772
Hola, myd. Bienvenido al Foro.

Aqui tienes una idea:
Código PHP:
<html>
<
head>
<
script>
function 
sumar() {
    
n1=parseInt(document.getElementById("numero1").value);
    
n2=parseInt(document.getElementById("numero2").value);
    
document.getElementById("resultado").value=n1+n2;
    
}
</script>
</head>

<body>
<input type="text" id="numero1" onKeyPress="sumar()">
<input type="text" id="numero2" onKeyPress="sumar()">
<input type="text" id="resultado">

</body>
</html> 
Saludos,

Última edición por JavierB; 16/11/2003 a las 13:23