![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
09/08/2004, 08:08
|
| | 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> |