前端基础Javascript数据类型基本类型Number取整On this page取整Math.floor() 向下取整Math.floor(3.141592654) // 3Math.ceil() 向上取整Math.ceil(3.141592654) // 4Math.round() 四舍五入Math.round(3.141592654) // 3parseInt() 去掉小数点和小数点后的部分parseInt(3.141592654) // 3~~ 将数据转化为Number类型~~3.141592654 // 3链接JavaScript 取整的几种方法 javascript取整方法floor、round、ceil