- 博客(3)
- 资源 (1)
- 收藏
- 关注
原创 千分位显示数值
有时为了阅读方便,需要将大数值展示为逗号表示法。 当然将数值转为数组在插入逗号方式可行。 介绍两种简便方法: 1. 如上篇文章所写,使用toLocaleString()方法。> 10154545450.42.toLocaleString('en-US')< "10,154,545,450.42"> (-1234567.8912).toLocaleString('...
2018-02-26 22:11:22 3042
原创 Number类型的toLocaleString()方法
https://twitter.com/wesbos/status/966697179904651264toLocaleString()方法我的理解是用于返回某语言系统下数字的表示字符串。如上推图片展示: 第一个参数为语言标识。参数值参考:https://tools.ietf.org/html/rfc5646#appendix-A 第二个参数为一个参数对象,可以设置为货币显示,如推...
2018-02-26 22:00:39 4884
原创 Angular5 + Bootstrap4使用示例
前段时间Bootstrap发布4.0正式版。官网地址:https://getbootstrap.com/如何将Angular5与Bootstrap4结合使用呢?使用Angular-cli初始化项目。 ng new my-project --style=scss 安装Bootstrap及需要的依赖 npm i bootstrap jquery popper.js --save-dev;
2018-02-02 22:36:06 5646
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人