5月10日 CMS 周四

<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">

    <title>My JSP 'list.jsp' starting page</title>

    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">    
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->

  <script type="text/javascript" src="js/jquery-1.8.2.js"></script>
  <script type="text/javascript">
    function goPage(cpage){
        location="student?m=list&cpage="+cpage;
    }
  </script>
  </head>

  <body>
    <table border="1px">
        <tr>
            <th>id</th>
            <th>姓名</th>
            <th>性别</th>
            <th>状态</th>

        </tr>
        <c:forEach var="s" items="${studentList}">
            <tr>
                <td>${s.id}</td>
                <td>${s.name}</td>
                <td>${s.sex}</td>
                <td>${s.age==1?"新建":s.age==2?"审核通过":"审核不通过"}</td>

            </tr>
        </c:forEach>
        <tr>
            <th colspan="21">
                <button onclick="goPage(1)">首页</button>
                <button onclick="goPage(${cpage<=1?cpage:(cpage-1)})">上一页</button>
                <button onclick="goPage(${cpage>=totalPage?totalPage:(cpage+1)})">下一页</button>
                <button onclick="goPage(${totalPage})">末页</button>

                <input id="p" value="${cpage}" style="width:30px"/>
                <button onclick="jumpPage()"></button>
            </th>
        </tr>
    </table>
  </body>
</html>

在这个世界上,总是有不同的人选择着自己不同的生活方式,而那大部分都是没什么意义的,活着,做一些事确定自己活着,其实就是如此而已。
——nicotine《活着就是恶心》

猜你喜欢

转载自blog.csdn.net/helloworld_1996/article/details/80275275