I have a form where the user inputs a number, selects a size, and then the total is displayed in a third box. The problem is, I want the total to be formatted to two decimal places. The answer has to be simple, but I can't find anything:
<script language = JavaScript>
function calculate()
{
A = document.form1.txtFirstNumber.value
B = document.form1.txtSecondNumber.value
A = Number(A)
B = Number(B)
C = (A * B )
document.form1.txtThirdNumber.value = C
}
</script>
<script language = JavaScript>
function calculate()
{
A = document.form1.txtFirstNumber.value
B = document.form1.txtSecondNumber.value
A = Number(A)
B = Number(B)
C = (A * B )
document.form1.txtThirdNumber.value = C
}
</script>