定义一个方法,
toPercent: function (point) {
var str = Number(point*100).toFixed(1);
str += "%";
return str;
},
测试:toPercent(.0.01)
结果为 1%;
定义一个方法,
toPercent: function (point) {
var str = Number(point*100).toFixed(1);
str += "%";
return str;
},
测试:toPercent(.0.01)
结果为 1%;