Hola remy.
Prueba esto:
Código PHP:
<html>
<head>
<script language="JavaScript">
function calcula(){
var val1, val2, valR;
with (document.frm){
valR = 0;
val1 = (op1.value == "" || isNaN(op1.value)? 0: parseInt(op1.value, 10));
val2 = (op2.value == "" || isNaN(op2.value)? 0: parseInt(op2.value, 10));
valR = val1 + val2;
res.value = String(valR);
}
}
</script>
</head>
<body>
<form name="frm">
<table border="0">
<tr>
<td align="right">
operando 1
</td>
<td>
<input type="text" name="op1" onkeyup="calcula()">
</td>
</tr>
<tr>
<td align="right">
operando 2
</td>
<td>
<input type="text" name="op2" onkeyup="calcula()">
</td>
</tr>
<tr>
<td align="right">
Resultado
</td>
<td>
<input type="text" name="res" readonly>
</td>
</tr>
</table>
</form>
</body>
</html>
Saludos.