Ver Mensaje Individual
  #7 (permalink)  
Antiguo 19/10/2009, 09:13
Avatar de goyo_
goyo_
 
Fecha de Ingreso: agosto-2009
Mensajes: 91
Antigüedad: 14 años, 9 meses
Puntos: 1
Respuesta: Por qué solo me funcionan mis script con IE

Como una alternativa, se me ocurrio lo siguiente:

Código PHP:
<html>
<
head>
<
title>Ejercicio 14</title>

<
script type="text/javascript">
function 
numero(n) {
    return 
parseInt(n.value10);
}

function 
suma() {
    var 
forma document.sumas;
    
    
forma.resu.value numero(forma.uno) + numero(forma.dos);
}
</script>

</head>
<body>

<h1>INTRODUCE LOS NUMEROS QUE DESEAS SUMAR</h1>

<center>
<form name=sumas>
<input type="text" name="uno" size=35 maxlength=5><br><br>
<input type="text" name="dos" size=35 maxlength=5><br><br>
<input type="button" onClick="suma()" value="Sumar"><br><br>
<input type="text" name="resu" size=35 maxlength=5>
</form>
</center>

</body>
</html>