<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 动漫搜索 <% //currentPage当前显示页数 if (request.getParameter("currentPage") == null||request.getParameter("currentPage").equals("")) { pageContext.setAttribute("currentPage", new Integer(0)); } else { pageContext.setAttribute("currentPage", request .getParameter("currentPage")); } %> select* from anime <% int perPageNum = Integer.parseInt((String) pageContext .getAttribute("PerPageNum")); int resultNum = Integer.parseInt((String) pageContext .getAttribute("resultNum")); int pageNum; //如果所有记录数除每页显示记录数没有余数-1 if((int)resultNum%perPageNum==0) pageNum = (int)(resultNum / perPageNum-1); else pageNum = (int)(resultNum / perPageNum); pageContext.setAttribute("pageNum", pageNum); %>
序号 热搜动漫 动漫简介 更新集数 搜索指数 动漫详情
${row.id } ${row.introduce} ${row.blues} ${row.times }
总共有${pageNum+1}页-第${currentPage+1}页-上一页 - 下一页
2024-04-03 09:44:34 806KB ajax mysql 局部刷新界面
1