toFixed Method (JavaScript)
Returns a string representing a number in fixed-point notation.
numObj.toFixed([fractionDigits])
The toFixed method returns a string representation of a number in fixed-point notation. The string contains one digit before the significand's decimal point, and must contain fractionDigits digits after it.
If fractionDigits is not supplied or undefined, the toFixed method assumes the value is zero.
Supported in the following document modes: Quirks, Internet Explorer 6 standards, Internet Explorer 7 standards, Internet Explorer 8 standards, Internet Explorer 9 standards. See Version Information.
Applies To: Number Object (JavaScript)