6月25日 SSH 周一

<%@ 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">
    -->

  <link rel="stylesheet" href="css/index_work.css" type="text/css"></link>
  <script type="text/javascript" src="js/jquery-1.8.2.js"></script>
  <script type="text/javascript">
    function mohu(){
    var mohu = $("#mohu").val();
        location = "s_list?mohu="+mohu;
    }
  </script>
  </head>

  <body>
    <table>
    <tr>
        <th colspan="21">
            <input id="mohu"><input type="button" value="查询" onclick="mohu()">
        </th>
    </tr>
        <tr>
            <th>id</th>
            <th>name</th>
            <th>stock</th>
            <th>datea</th>
            <th>typea</th>
            <th>content</th>
            <th>bid</th>
            <th>bname</th>
            <th>bcontent</th>
            <th>bdatea</th>
            <th>操作</th>
        </tr>
        <c:forEach var="s" items="${shopList}">
            <tr>
                <th>${s.id}</th>
                <th>${s.name}</th>
                <th>${s.stock}</th>
                <th>${s.datea}</th>
                <th>${s.typea}</th>
                <th>${s.content}</th>
                <th>${s.b.bid}</th>
                <th>${s.b.bname}</th>
                <th>${s.b.bcontent}</th>
                <th>${s.b.bdatea}</th>
                <th><input type="button" value="修改" onclick="location='update.jsp?id=${s.id}'"></th>
            </tr>
        </c:forEach>
        <tr>
            <th colspan="21">
                <input value="首页" type="button" onclick="gopage(1)">
                <input value="上页" type="button" onclick="gopage(${pu.prevPage})">
                <input value="下页" type="button" onclick="gopage(${pu.nextPage})">
                <input value="末页" type="button" onclick="gopage(${pu.totalPage})">
                ${pu.cpage}共${pu.totalPage}页${pu.count}条数据
            </th>
        </tr>
    </table>
  </body>
</html>

哀其不幸,怒其不争。
《孔乙己》——鲁迅

猜你喜欢

转载自blog.csdn.net/helloworld_1996/article/details/80808933
今日推荐