📄 productlist.jsp
字号:
<%@page contentType="text/html;charset=gbk"%><%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %><html><head><title>首页</title></head><body bgcolor="#ffffff" background="/ShoppingCar/imager/2.jpg"><h1 align="center"><font color="blue">系统的所有商品列表如下:</font></h1><h2 align="right"><input type="button" onclick="self.location='<c:url value="/manager/add.jsp"/>'" value="添加新商品"><input type="button" onclick="self.location='<c:url value="/manager/work.jsp"/>'" value="返回" ><input type="button" onclick="self.location='<c:url value="/manager/logout.do"/>'" value="退出"></h2><hr><table width="%75" border="1" align="center"><tr> <th>商品名称</th> <th>价格</th> <th>删除</th> <th>更新</th></tr> <c:forEach items="${products}" var="product"><tr> <td>${product.pname }</td> <td align="center">${product.price }</td> <td align="center"> <a onclick="return confirm('确定删除该商品 ? ');" href="<c:url value="/manager/delete.do?id=${product.id}"/>">删除</a> </td> <td align="center"> <a href="<c:url value="/manager/toedit.do?id=${product.id}"/>">更新</a> </td></tr></c:forEach><c:if test="${empty products}"> <tr> <td align="center" colspan="4">没有商品信息</td> </tr></c:if><c:if test="${!empty products}"> <tr> <td align="right" colspan="4"> 共${info.pageCount}页 | 第${info.currentPage}页 | <c:if test="${!info.firstPage}"> <a href="${pageContext.request.contextPath}/manager/firstPage.do">首页</a> | <a href="${pageContext.request.contextPath}/manager/previousPage.do">上一页</a> | </c:if> <c:if test="${!info.lastPage}"> <a href="${pageContext.request.contextPath}/manager/nextPage.do">下一页</a> | <a href="${pageContext.request.contextPath}/manager/lastPage.do">尾页</a> </c:if> </td> </tr></c:if></table><br></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -