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

jquery rounding up and down is suitable for paging queries_jquery

WBOY
WBOYOriginal
2016-05-16 16:36:551630browse

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>
Statement:
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