Home > Web Front-end > JS Tutorial > jquery rounding up and down is suitable for paging queries_jquery

jquery rounding up and down is suitable for paging queries_jquery

WBOY
Release: 2016-05-16 16:36:55
Original
1726 people have browsed it

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>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template