- Math.round
Math.round(1.1) // => 1 - Math.ceil
Math.ceil(1.1) // => 2 - Math.floor
Math.floor(1.9) // => 1 - num.toFixed( digits )
(100.123).toFixed(2) // => "100.12"
(100.123).toFixed(0) // => "100"
本文标题:数值
本文链接:https://www.haomeiwen.com/subject/jpbcyttx.html
网友评论