Format numbers in JavaScript similar to C#
format, javascript, jquery, numbers
Solution
Generally
- Formatting numbers in JavaScript
- Formatting numbers for currency display and more.
In jQuery
- autoNumeric (a decent number formatter & input helper with locale support for jQuery 1.5+)
- jQuery Format (a clientSide implementation of Java's SimpleDateFormat and NumberFormat)
- jquery-numberformatter (number formatter with locale support)
Problem
Is there a simple way to format numbers in JavaScript, similar to the formatting methods available in C# (or VB.NET) via `ToString("format_provider")` or `String.Format()`?