資源描述:
《代碼實(shí)例-jsp分頁源程序》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在應(yīng)用文檔-天天文庫。
1、代碼實(shí)例:JSP分頁源程序>>教育資源庫<%pagecontentType="text/html;charset=gb2312"language="java"%><%pageimport="java.util.*"%><%pageimport="java.io.*"%><%pageimport="java.sql.*"%><html><head><title>教師信息查詢</title><styletype="text/css"><!--
2、.style1{font-family:"華文行楷";color:#FFFFFF;}--></style><linkhref="default.css"rel="stylesheet"type="text/css"><styletype="text/css"><!--.style6{color:#000000;font-size:24px;}.style9{font-size:24px}--></style></head><bodybgcolor="#ff
3、ffff"><%session.getAttribute("a_name");%><h1align="center"class="style1style6style9">教師信息查詢</h1><hr/><jsp:useBeanid="tmessgeBean"scope="page"class="puter.sqlbean"/><tablel">返回首頁</a></div></td></tr><tralign="center"bgco
4、lor="#999999"><tdclass="style4">教號</td><tdclass="style4">姓名</td><tdclass="style4">系別</td><tdclass="style4">專業(yè)</td><tdclass="style4">操作選項(xiàng)</td></tr><%request.setCharacterEncoding("gb2312");intnoessgeBean.getCounter("s
5、electcount(*)fromdysf_teacher");pageCount=(int)Math.ceil((recordCount+countPerPage-1)/countPerPage);//算出總頁數(shù)if(request.getParameter("pages")==null){pages=1;}else{pages=neeter("pages")).intValue();}if(pages>pageCount){noessgeBean.executeQuery("Selecttop
6、"+countPerPage+"*fromdysf_teacherdysf_teacherorderbyiddesc)orderbyiddesc");ent=rs.getString("department");Stringtspecial=rs.getString("special");Stringtname=rs.getString("name");%><tr><tde%></div></td><tdwidth="20%"><divalign="center
7、"></div>12下一頁>>>>這篇文章來自..,。<divalign="center"><%=tdepartment%></div></td><tdp;nbsp;當(dāng)前<fontcolor=red><%=nop;nbsp;<%if(pageCount>1){%><%if(pages>1){%><ahref="">首頁</a><%}if(pages<pageCount){%><ahref="?pages=&l
8、t;%=noe="pages"onChange="javascript:this.form.submit();"><%for(inti=1;i<=pageCount;i++){%><optionvalue="<%=i%>"<%if(nol>上一頁12>>>>這篇文章來自..,。