In my code, I have this:
<script language="javascript">
function addNumbers()
{
var collect = parseFloat(document.getElementById("Collect").value);
var current = parseFloat(document.getElementById("Current").value);
var Balance = document.getElementById("Bal");
Balance.value = collect + current;
}
</script>
If, for example,the input is: 123.12 + 12.22, the Balance is 135.34 But if the input is : 123.00 + 12.00, the Balance is 135 instead of 135.00.
What should I add to achieve the 2nd output sample?
Thanks.