HcpShadow / jquery-numberformatter

Automatically exported from code.google.com/p/jquery-numberformatter
0 stars 0 forks source link

can you give a full example of how to use this? #41

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,  I am looking for a very simple example of using this code, such as:
<html>
<body>
<script language=javascript>
var mynumber = 1234567.8901
document.write("hi this is the number " + mynumber.format("#,##0.00", "en"))
</script>
</body>
</html>

I see some partial examples in the project home but it's not clear to me how to 
do the above. Would it be possible to provide a complete example that includes 
all of the HTML code and lists out all of the js code that is referenced by the 
HTML?

Original issue reported on code.google.com by mewa...@gmail.com on 30 Apr 2011 at 2:04

GoogleCodeExporter commented 8 years ago
BTW, I wasn't trying to label this a "defect" but it looks like I can't change 
it now

Original comment by mewa...@gmail.com on 30 Apr 2011 at 2:05

GoogleCodeExporter commented 8 years ago
A little late on this (must have missed the mail), but please see the front 
page, it has an example for a direct number format -

var number = 123.456;
var text = $.formatNumber(number, {format:"#,###.00", locale:"us"});

I will be working on better ways of doing this in the next release I think.

Original comment by apar...@gmail.com on 11 Sep 2011 at 4:02

GoogleCodeExporter commented 8 years ago

Original comment by apar...@gmail.com on 11 Sep 2011 at 4:02