...

View Full Version : How do I round a number?



rama
07-07-2002, 08:46 AM
Hi,

I have to calculate a amount field based on the below formula,


installamountto=netamountto/term.

The output sometimes can come like


3.3333333,or 45.777777,etc.It can be any value but i want to round the decimal to only 2 digits or suppose for example if the value is 45.45,round it to 45.5.


How do i achieve this using javascript.

Thanks

Rama

WA
07-07-2002, 09:45 AM
Check out the following tutorial on JavaScriptKit: http://www.javascriptkit.com/javatutors/round.shtml

Hope it helps,

rama
07-07-2002, 03:51 PM
Hi,

Tutorial was useful .thank u.


Rama



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum