function toPercent() {
Number.prototype.toPercent = function(){
return (Math.round(this * 10000)/100).toFixed(2) + '%';
}
}
javascript把number转化成百分比
最新推荐文章于 2024-05-09 01:43:48 发布
function toPercent() {
Number.prototype.toPercent = function(){
return (Math.round(this * 10000)/100).toFixed(2) + '%';
}
}