toFixed()、Math.round()、向文本添加符号

2022-01-05  本文已影响0人  深呼吸10911
toFixed()

 With rotation = 1, rotation.value.toFixed(2) will give 1.00
• With rotation = 1.234, rotation.value.toFixed(0) will give 1
• With rotation = 1.234, rotation.value.toFixed(2) will give 1.23
上一篇下一篇

猜你喜欢

热点阅读