1、toLocaleString():将数字格式化为带有千分位分隔符的字符串
2、使用 toLocaleString() 将数字转为百分比
var a = 1;
console.log(a.toLocaleString('zh',{style:'percent'}))
var b = 10;
console.log(b.toLocaleString('zh',{style:'percent'}))
var c = 2;
console.log(c.toLocaleString('zh',{style:'percent'}))
var d = 0.2;
console.log(d.toLocaleString('zh',{style:'percent'}))