Ver Mensaje Individual
  #2 (permalink)  
Antiguo 14/01/2005, 10:24
Avatar de JavierB
JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 22 años, 3 meses
Puntos: 772
Hola Phantasma__

A ver si esto te sirve:
Código HTML:
<html>
<head>
<script>
function sumar(frm) {
  s1=parseInt(frm.sum1.value);
  s2=parseInt(frm.sum2.value);
  if(isNaN(s1)) s1=0;
  if(isNaN(s2)) s2=0;
  frm.total.value=s1+s2;
}
</script>
</head>
<body>
<form>
<input type="text" name="sum1" onkeyup="sumar(this.form)" />
<input type="text" name="sum2" onkeyup="sumar(this.form)" />
<input type="text" name="total" />
</form>
</body>
</html> 
Saludos,