js 百分比保留小数点后两位

(Math.round((2 / 7) * 100*100)/100).toFixed(2) + '%'

 

 

(Math.round((2 / 7) * 100*100)/100).toFixed(2) + '%'
"28.57%"

posted @ 2020-08-11 09:52  吃鸡小能手  阅读(2001)  评论(0编辑  收藏  举报