Js页面截取小数点后两位 toFixed(四舍五入): var num = 22.126456; num.toFixed (2) = 22.13 floor(向下取整): var num = 22.126456; Math.floor(num*100)/100 = 22.12 ceil(向上取整): var num = 22.126456; Math.ceil(num*100)/100 = 22.13 round(四舍五入): var num = 22.126456; Math.round(num*100)/100 = 22.13