会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
MoenyChen
博客园
首页
新随笔
联系
管理
订阅
2018年9月4日
js 格式化数字,数字每隔三位加个逗号
摘要: function formattedNumber(num) { var num = (num || 0).toString(); var result = ''; while (num.length > 3) { result = ',' + num.slice(-3) + result; num
阅读全文
posted @ 2018-09-04 20:38 MoenyChen
阅读(1614)
评论(0)
推荐(0)
公告