4条回答 默认 最新
- 套你的猴子 2021-06-18 03:15关注本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 1无用*Hangover* 2021-06-18 03:26
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%><%@ page language="java" import="com.blog.dao.ArticleDao,com.blog.dto.Article" %><% String list_con = "",part_msg = "",spage = "",type_str=""; spage =request.getParameter("pg"); //获取传递来的参数 String total = ""; String current = ""; String totalpage = ""; int up=1,down=1; int pgSize = 10; //每页显示的条数 int cpage = 0; //当前显示的条数 if(spage!=null){ cpage = Integer.parseInt(spage); } String cid = request.getParameter("cid"); ArticleDao dao = new ArticleDao(); List lista = dao.getList(cpage,pgSize,cid); Iterator ita = lista.iterator(); while(ita.hasNext()){ Article l = (Article)ita.next(); type_str = l.getSort(); list_con += "<h2 class=\"title\">"+l.getTitle()+"" +"
日期:"+l.getPubtime()+"
" +"" +""; } total = new Integer(dao.getTotal()).toString(); current = new Integer(dao.getCPages()).toString(); totalpage = new Integer(dao.getTPages()).toString(); //分页运算 up = dao.getCPages()-1; down = dao.getCPages()+1; if(up<1){ up = 1; } if(down>=dao.getTPages()){ down = dao.getTPages(); } part_msg = "共"+total+"条数据,分"+totalpage+"页,当前为第"+current+"页 上一页 下一页 "; %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><title><%=type_str %>_红色玫瑰</title><meta name="keywords" content="" /><meta name="description" content="" /><link href="style.css" rel="stylesheet" type="text/css" media="screen" /></head><body>“"+l.getContent()+" ”
<%@include file="bottom.jsp" %></body></html>红色玫瑰
Red Roses
<%=list_con %><%=part_msg %>
赞回复
悬赏问题
- ¥15 nginx使用nfs进行服务器的数据共享
- ¥15 C#i编程中so-ir-192编码的字符集转码UTF8问题
- ¥15 51嵌入式入门按键小项目
- ¥30 海外项目,如何降低Google Map接口费用?
- ¥15 fluentmeshing
- ¥15 手机/平板的浏览器里如何实现类似荧光笔的效果
- ¥15 盘古气象大模型调用(python)
- ¥15 传人记程序做的plc 485从机程序该如何写
- ¥15 已知手指抓握过程中掌指关节、手指各关节和指尖每一帧的坐标,用贝塞尔曲线可以拟合手指抓握的运动轨迹吗?
- ¥50 libwebsockets 如何添加其他socket事件回调