I had a javascript calculation that was displaying a ton of decimal points.
Here is a way to round to 2 decimal places in Javascript:
var total = 123.433
total = Math.round(total*100)/100 //returns 123.43
Credit Goes to Javascript ToolKit
My name is Randy Johnson. I use Lucee, Coldfusion, PHP, jQuery, Javascript & MySQL on a daily basis. When called upon I will flex my Linux and Windows server administration & server migrations but prefer to be programming web applications.
I had a javascript calculation that was displaying a ton of decimal points.
Here is a way to round to 2 decimal places in Javascript:
var total = 123.433
total = Math.round(total*100)/100 //returns 123.43
Credit Goes to Javascript ToolKit
The page you were looking for, could not be found. You may have typed the address incorrectly or you may have used an outdated link.
Go to Homepage
No comments