JavaScript Reference/Javascript Methods/toFixed
"toFixed()" Example
<html>
<body>
<button onclick="var myNum = new Number(100.22); alert(myNum.toFixed(1));">
fix 100.22
</button>
</body>
</html>
"toFixed()" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |Number |
+----------------+--------------------------------------------------------------+
"toFixed()" Syntax Parameters and Note
Note:
Rounds the Number to the specified number of decimal places.
Syntax:
numberName.toFixed(param1)
Parameters:
param1 Required; the number of decimal places.