Home > Article > Web Front-end > jquery rounding up and down is suitable for paging queries_jquery
When using ajax for paging query, the number of paging should use the rounding function
<script language="javascript"> var uu=Math.floor(5.36) //向下取整 结果为5 var uu=Math.floor(5.88) //结果为5 Math.ceil(5.33) //向上取整,结果为6 Math.round(5.55) //四舍五入 结果为6 math.round(5.22) //结果为5 </script>