📄 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">欢迎您访问阿玛尼,您的满意是我们永恒的追求.</h2><c:if test="${empty user}"> <h3 align="right"><a href="user/add.jsp">注册新用户</a> <a href="shopping/login.jsp">登录</a></h3></c:if><c:if test="${!empty user}"><input type="button" onclick="self.location='<c:url value="/user/home.do"/>'" value="查看我的历史定单"></c:if><hr><table width="%75" border="3" align="center" bordercolor="red" bgcolor="greed"><tr> <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 href="<c:url value="/shopping/addProduct.do?id=${product.id}"/>">添加到购物车</a></td></tr></c:forEach><c:if test="${empty products}"> <tr> <td align="center" colspan="3">没有商品信息</td> </tr></c:if><c:if test="${!empty products}"> <tr> <td align="right" colspan="3"> 共${info.pageCount}页 | 第${info.currentPage}页 | <c:if test="${!info.firstPage}"> <a href="${pageContext.request.contextPath}/shopping/firstPage.do">首页</a> | <a href="${pageContext.request.contextPath}/shopping/previousPage.do">上一页</a> | </c:if> <c:if test="${!info.lastPage}"> <a href="${pageContext.request.contextPath}/shopping/nextPage.do">下一页</a> | <a href="${pageContext.request.contextPath}/shopping/lastPage.do">尾页</a> </c:if> </td> </tr></c:if></table><center> <br> <a href="<c:url value="/shopping/viewCar.do"/>">查看购物车</a></center></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -