An open API service indexing awesome lists of open source software.

https://github.com/k186/number2words

数字转换成中文大写,最大12位整数,小数最多3位
https://github.com/k186/number2words

gulp magic number tool

Last synced: 2 months ago
JSON representation

数字转换成中文大写,最大12位整数,小数最多3位

Awesome Lists containing this project

README

          

##数字转中文大写(javascript)

欢迎提建议谢谢。

###现在状态
最大输入12位整数,小数最多3位
```
壹 亿 贰 仟 叁 佰 肆 拾 伍 万 陆 仟 柒 佰 捌 拾 玖 元 壹 角 贰 分 叁 厘
```

自动判断小数位数,不在做默认设定

使用方法
```
var option={
isTag:true, //false
numTag:'span',//可为空
unitTag:'div'//可为空
};
*.innerHTML= num2word(number,option);调用方法名 及参数
```

传入参数增加输出标签ID
```
现有输出是字符串如果在某些情况下会转义html标签,这是我们不想看到的
····
option={
....
outputID:""
}
num2word(number,option);调用方法名 及参数
```