[Javascript] Multiplication

Andrew Gibson andyg at ihug.co.nz
Sat Jun 23 20:02:58 CDT 2001


Think this has been asked before but how do I format numbers after
multiplication

eg

var myNumber=6*1.5

that returns 9 but how do I make it 9.00

or how do I make 3*1.5     4.50  rather than 4.5

In ASP we would just go formatnumber(myNumber,2)  is there no similar
function in Javascript?

Andrew






More information about the Javascript mailing list