Ver Mensaje Individual
  #3 (permalink)  
Antiguo 09/08/2004, 08:08
sombra_cl
 
Fecha de Ingreso: abril-2004
Ubicación: Concepcion
Mensajes: 72
Antigüedad: 20 años, 9 meses
Puntos: 0
Hola:
Es lo que necesitaba, pero algo esta mal , porque no rula:
<html>
<head> SUMA DE 2 NUMEROS</head>
<body>
<script>
function fncSumar(){
var numero1 = Number(document.getElementById("numero1").value);
var numero2 = Number(document.getElementById("numero2").value);
document.getElementById("resultado").value = numero1+numero2;
}
</script>
<form method="post" name="sumar">

Primer numero: <input type="text" name="numero1" size="2" onKeyUp="fncSumar()"/>
Segundo numero: <input type="text" name="numero2" size="2" onKeyUp="fncSumar()"/>
Resultado: <input type="text" name="resultado"/>
</form>
</body>
</html>