Accounting.js库的使用
来源:互联网 发布:阿沁淘宝店 编辑:程序博客网 时间:2024/06/03 18:46
Accounting.js用来将一个数字格式化为货币格式
使用案例:
<!DOCTYPE html><html><head> <meta name="description" content="math.js | basic usage"> <title>math.js | basic usage</title> <script src="accounting.js"></script></head><body> <script> // functions and constants //格式化为美元,默认 print(accounting.formatMoney(45998307)); // $45,998,307.00 //也可以指定参数 /* var options={ symbol :"$", decimal:".", thousand:",", precision:2, format:"%s%v" } */ //欧元形式 print(accounting.formatMoney(4587.35,"€",3,".",","));//€4.587,350 //也可以格式化整个一列数字: var list =[[455,12,3],[88,25,2],[667,825,14]]; var c = accounting.format(list);//455,12,3,88,25,2,667,825,14 print(c); print(accounting.formatColumn(list));//$455.00,$ 12.00,$ 3.00,$88.00,$25.00,$ 2.00,$667.00,$825.00,$ 14.00 // helper function to output formatted results. function print(value) { var precision = 14; document.write(value + '<br>'); } </script></body></html>
下载网站:http://openexchangerates.github.io/accounting.js/#download
阅读全文
0 0
- Accounting.js库的使用
- accounting.formatNumber/Money的使用格式化货币、数字
- accounting
- SAP的财务会计架构(Financial Accounting)
- SAP的财务会计架构(Financial Accounting)
- SAP的财务会计架构(Financial Accounting)
- SAP的财务会计架构(Financial Accounting)
- Math.js库的使用
- Accounting 里的Debit 和 credit是如何区分的。。。
- Difference among Accounting Principle(会计准则的异同比较)
- PeachTree Accounting
- Accounting Document
- RADIUS Accounting
- A. Accounting
- FacePalm Accounting
- accounting assistant
- Documentation\accounting\delay—accounting
- Documentation/accounting/delay-accounting.txt
- Qt5开发学习之文本编辑功能(七)
- 相对路径、绝对路径、mysql及jdbc基础
- [Leetcode-146] LRU Cache 最近最少使用页面置换算法
- struct ip 和struct iphdr的差别 , <netinet/*.h>和<linux/*.h>
- POJ 2769 Reduced ID Numbers
- Accounting.js库的使用
- Docker 删除image
- 【Linux 学习】 文件系统
- 如何防止ISE综合时信号不被优化掉
- 年中总结
- Neo4j CQL -(4)- MATCH & RETURN匹配和返回
- shell 脚本替换文件中某个字符串
- vc2010创建dll和使用
- HDU 1711 Number Sequence【KMP】【模板题】【水题】(返回匹配到的第一个字母的位置)