realiza la suma del lado del servidor
$total = (float)$variable1 + (float)$variable2 + (float)$variable3;
o si tienes que obligatoria-mente hacer todo en js
Código PHP:
<script type="text/javascript">
function suma()
{
valor1 = document.getElementById("A").value;
valor2 = document.getElementById("B").value;
valor3 = document.getElementById("C").value;
total = parseFloat(valor1) + parseFloat(valor2) + parseFloat(valor3);
document.getElementById("total").value= total;
document.getElementById("form").value= total;
}
</script>
</head>
<body>
<form action="test.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="form" id="form" />
<input type="text" value="" name="var1" id="A" onchange="suma();" />
<input type="text" value="" name="var2" id="B" onchange="suma();" />
<input type="text" value="" name="var3" id="C" onchange="suma();" />
<input type="text" value="0" id="total" disabled /> /* en nombre de la variable es form */
<input type="submit" value="Guardar">
</form>
</body>
</html>