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.value, 10);
}
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>