// 百分号留后面几位 四舍五入法则
this.percent = function (v, n) {
if (typeof (v) == 'number') {
return (v * 100).toFixed(n) + '%';
}
}
想用更多的方法请打开JavaScript基础包
// 百分号留后面几位 四舍五入法则
this.percent = function (v, n) {
if (typeof (v) == 'number') {
return (v * 100).toFixed(n) + '%';
}
}
想用更多的方法请打开JavaScript基础包
转载于:https://my.oschina.net/u/3875237/blog/3021045