前端js取余是a%b

取除数parseInt(a / b)

/**
* 总页数@param(总条数,每页总条数)
*/
function pageTotal(rowCount, pageSize) {
console.log("总条数"+rowCount+"每页总条数"+pageSize)
if (rowCount == null || rowCount == "") {
return 0;
} else {
if (pageSize != 0 &&
rowCount % pageSize == 0) {
return parseInt(rowCount / pageSize);
}
if (pageSize != 0 &&
rowCount % pageSize != 0) {
return parseInt(rowCount / pageSize) + 1;
}
}
}

05-11 17:39