Skip to content

将数字格式化为货币字符串 ​

Intl.NumberFormat ​

javascript
new Intl.NumberFormat('en-US', {
  style: 'currency',
  currency: 'USD'
}).format(10000)

toLocaleString ​

javascript
(10000).toLocaleString('en-US', {
  style: 'currency',
  currency: 'USD',
})

货币代码的列表

更新时间: