简介 accounting.js 是一个非常小的JavaScript方法库用于对数字,金额和货币进行格式化。并提供可选的Excel风格列渲染。它没有依赖任何JS框架。货币符号等可以按需求进行定制。 代码内容及下载地址 accounting.js代码如下: /*! * accounting.js v0.3.2 * Copyright 2011, Joss Crowcroft * * Freely distributable under the MIT license * Portions of accounting.js are inspired or borrowed from underscore.js * * Full details and documentation : * http://josscrowcroft.github.com/accounting.js/ */ (function(root, undefined) { /* --- Setup
获得数字小数部分的长度 formatNumber方法,将数字转为货币数字格式(不带货币符号) formatMoney方法,将数字转为货币格式(带货币符号) 想获得源码的朋友: 可以在网上搜索 accounting.js ,在GitHub里拿到插件代码; accounting.js是一个用于数字,货币和货币解析/格式化的小型JavaScript库。
浏览器) octocard: 用于生成 Github 信息卡片的库 github-cards: 用于生成 Github 信息卡片的库 money.js: 轻量级货币转换库,web 和 node 皆可用 accounting.js
浏览器) octocard: 用于生成 Github 信息卡片的库 github-cards: 用于生成 Github 信息卡片的库 money.js: 轻量级货币转换库,web 和 node 皆可用 accounting.js
官网 accounting.js:对数字、金钱、货币进行格式化的轻量库——完全本地化和无依赖。官网 money.js:一个小巧(1kb)的货币转换库,适用于 web 和 nodeJS。
accounting.js - 用于数字,货币和货币格式的轻量级JavaScript库 - 完全可本地化,零依赖性。
accounting.js - 用于数字,货币和货币格式的轻量级JavaScript库 - 完全可本地化,零依赖性。