随笔分类 -  03 JS

摘要:Javascript Math.ceil()与Math.round()与Math.floor()区别:Math.ceil()向上舍入123alert(Math.ceil(20.1)) //输出 21alert(Math.ceil(20.5)) //输出 21alert(Math.ceil(20.9)) //输出 21Math.round标准的四舍五入123alert(Math.round(20.1)) //输出 20alert(Math.round(20.5)) //输出 21alert(Math.round(20.9)) //输出 21Math.floor()向下舍入123alert(Mat 阅读全文
posted @ 2014-03-04 13:11 神煌 阅读(200) 评论(0) 推荐(0)