A new programming idea (below): Accommoth 2-1 ntpage.jsp

zhaozj2021-02-16  49

NTPAGE.JSP

-------------------------------------------------- -----------------

<% Int PAGESIZE = 10; int old_PAGESIZE = PAGESIZE; int curPage = 1; int pageCount = 0; int iStart = 0; int iCount = 0; int totalRecordCount = ntP.rowCount; boolean onlyOnePage = true; try {if (request. getParameter ( "pagesize") = null) pAGESIZE = Integer.parseInt (request.getParameter ( "pagesize"));!! if (request.getParameter ( "pagesize_post") = null) pAGESIZE = Integer.parseInt (request.getParameter ( "pagesize_post"));} catch (Exception ePage13) {PAGESIZE = old_PAGESIZE;} if (PAGESIZE 0) {pageCount = totalRecordCount / PAGESIZE;! if (totalRecordCount% PAGESIZE = 0) pageCount = 1; if (curPage <1) curPage = 1; if (curPage> pageCount Curpage = pagecount; iStart = (CURPAGE-1) * Pagesize; ICOUNT = TotalRecordcount - iStart; Icount = Pagesize; ICOUN T = iStart ICOUNT;}%>

转载请注明原文地址:https://www.9cbs.com/read-25575.html

New Post(0)