Solved

how to format fixed digit number

Posted on 2008-06-12
3
228 Views
Last Modified: 2012-06-27
Hello Experts,
I need a javascript function that will return a small value with a fixed number of digits to the right of the decimal.
133.5999 to 133.59
please advice
thanks
sam
0
Comment
Question by:newbie27
  • 2
3 Comments
 
LVL 82

Accepted Solution

by:
hielo earned 500 total points
ID: 21770296
var x = 133.5999

 alert( x.toFixed(2) );
0
 
LVL 8

Author Closing Comment

by:newbie27
ID: 31466577
thanks
0
 
LVL 8

Author Comment

by:newbie27
ID: 21770328
hope you been doing well hielo, this has been a long since i have seen you here ....

please can you spend some time this evening to help me in few of the jQuery issues?
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Writing comments on <p></P> or paragraph 2 19
JQuery Syntax... 4 36
Do alert on select 6 14
Non-Resizable Pharagraph 2 7
This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question