【js】两个数相除有余数时结果加1 var all=15; var item=2; var pages=all%item==0?(all/item):(Math.floor(all/item)+1); console.log(pages)