7万
861
32万
论坛元老
1.丢弃小数部分,保留整数部分 parseInt(5/2) 2.向上取整,有小数就整数部分加1 Math.ceil(5/2) 3,四舍五入. Math.round(5/2) 4,向下取整 Math.floor(5/2)
FF: Firefox, IE: Internet Explorer
使用道具 举报
3
2万
301
中级会员
0
1万
1
207
16
376
174
注册会员
4
316
29
194
50
本版积分规则 发表回复 回帖后跳转到最后一页
手机版|小黑屋|网站地图|源码论坛 ( 海外版 )
GMT+8, 2025-2-2 06:05 , Processed in 0.127559 second(s), 24 queries .
Powered by Discuz! X3.4
Copyright © 2001-2020, Tencent Cloud.