Advertisement
KuoHsiangYu

showProduct.jsp

Aug 25th, 2019
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 0.84 KB | None | 0 0
  1. <%@ page language="java" contentType="text/html; charset=UTF-8"
  2.     pageEncoding="UTF-8"%>
  3. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  4. <!DOCTYPE html>
  5. <html>
  6. <head>
  7. <meta charset="UTF-8">
  8. <title>showProduct</title>
  9. </head>
  10. <body>
  11.     <div align="center">
  12.         <c:choose>
  13.             <c:when test="${not empty resultList}">
  14.                 <table border="1">
  15.                     <thead>
  16.                         <tr>
  17.                             <td>產品名稱</td>
  18.                             <td>原價 + 3000</td>
  19.                             <td>原價</td>
  20.                         </tr>
  21.                     </thead>
  22.                     <tbody>
  23.                         <c:forEach var="result" items="${resultList}">
  24.                             <tr>
  25.                                 <td>${result.title}</td>
  26.                                 <td>${result.price + 3000}</td>
  27.                                 <td>${result.price}</td>
  28.                             </tr>
  29.                         </c:forEach>
  30.                     </tbody>
  31.                 </table>
  32.             </c:when>
  33.             <c:otherwise>
  34.                 查無資料
  35.             </c:otherwise>
  36.         </c:choose>
  37.     </div>
  38. </body>
  39. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement