js对数值的取整,进1,四舍五入

取整数

parseInt();

进1

Math.ceil();

向下取整

Math.floor();

四舍五入

Math.round()

 

posted @ 2020-05-07 09:30  绯颜旧雨  阅读(2984)  评论(0编辑  收藏  举报