Código PHP:
<html>
<head>
<style>
input{border:none;
border-bottom:solid 1px black;
font:normal 12px/12px 'courier new';
text-align:right;
}
td{font:normal 10px verdana;
padding:0px 20px 0px 0px;}
</style>
<title>Untitled</title>
<script>
function sumar(){
total=0;
for(a=0;a<3;a++){
document.forms[0].elements[a].value=document.forms[0].elements[a].value.split(",").join(".");
if (!isNaN(document.forms[0].elements[a].value)){
pepe=new Number(document.forms[0].elements[a].value);
total=total+pepe;
document.forms[0].elements["total"].value=total}
else{document.forms[0].elements[a].value=0}
}
}
</script></head>
<body><table><form action="javascript:alert('Enviando')"
name="formularo" id="formularo">
<tr>
<td>
</td>
<td><input type="text" name="numero1" onkeyup=sumar()>
</td>
</tr>
<tr>
<td>
</td>
<td>
<input type="text" name="numero2" onkeyup=sumar()>
</td>
</tr>
<tr>
<td>
</td>
<td>
<input type="text" name="numero3" onkeyup=sumar()>
</td>
</tr>
<tr style="">
<td>TOTAL:</td>
<td>
<input type="text" readonly name="total">
</td>
</tr>
</form>
</table>
</body>
</html>