当值为1时,不保留小数位,直接显示100%
当值为小于1时,保留一位小数,如 99.8%、88.7%
这么写错在哪呢
function(){ if(this.value==1){return this.value.toFixed(0)*100+"%"}else{return this.value.toFixed(3)*100+"%"};}
.....是什么没明白 ,如果this是对象的话 你不能用js 来这么写