DH
Programmer
- Dec 8, 2000
- 168
Using javascript I have created an order form where the user enters the quantity for various products. Once the quantity is entered the total for each product is calculated automatically. At the end of the order form I have a Grand Total that adds the product totals together.
All works fine except that the grand total shows many digits to the right of the decimal point such as $59.1200000. Any suggestions on how to limit the digits to the right of the decimal place to 2 such as $59.12? Is there a rounding command or something?
All works fine except that the grand total shows many digits to the right of the decimal point such as $59.1200000. Any suggestions on how to limit the digits to the right of the decimal place to 2 such as $59.12? Is there a rounding command or something?