How To Fix JavaScript Floating Point Errors
erics, Posted February 27th, 2015 at 7:02:30pm
The .toFixed(2)
method will round off the value of the field to 2 decimal places
1 |
decimalNumTwoPlaces = parseFloat(this.value.toFixed(2)); |
Leave Your Comment
All fields marked with "*" are required.