Udostępnij za pośrednictwem


Number.localeFormat Function

Formats a number by using the current culture.

var a = numberVar.localeFormat(format);

Arguments

  • format
    A format string.

Return Value

A string that contains the formatted number value.

Exceptions

Exception type

Condition

Sys.ArgumentException

format is invalid.

Remarks

Use the localeFormat method to get a string representation of the Number object values that are based on the format parameter. The localeFormat method provides the number based on a specific culture value (locale). The culture value is also used to display information for specific language and country combinations.

For more information about cultures and locales, see ASP.NET Globalization and Localization and the CultureInfo documentation. For more information about date and time string formats, see Sys.CultureInfo Class.

See Also

Reference

Number Type Extensions

Other Resources

Language Reference