image.png
    image.png
    image.png
    image.png

    1. <%@ page contentType="text/html;charset=UTF-8" language="java" %>
    2. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    3. <!DOCTYPE html>
    4. <html lang="en">
    5. <head>
    6. <meta charset="UTF-8">
    7. <title>Title</title>
    8. </head>
    9. <body>
    10. <input type="button" value="新增" id="add"><br>
    11. <hr>
    12. <table border="1" cellspacing="0" width="80%">
    13. <tr>
    14. <th>序号</th>
    15. <th>品牌名称</th>
    16. <th>企业名称</th>
    17. <th>排序</th>
    18. <th>品牌介绍</th>
    19. <th>状态</th>
    20. <th>操作</th>
    21. </tr>
    22. <c:forEach items="${brands}" var="brand" varStatus="status">
    23. <tr align="center">
    24. <%--<td>${brand.id}</td>--%>
    25. <td>${status.count}</td>
    26. <td>${brand.brandName}</td>
    27. <td>${brand.companyName}</td>
    28. <td>${brand.ordered}</td>
    29. <td>${brand.description}</td>
    30. <c:if test="${brand.status == 1}">
    31. <td>启用</td>
    32. </c:if>
    33. <c:if test="${brand.status != 1}">
    34. <td>禁用</td>
    35. </c:if>
    36. <td><a href="/brand-demo/selectByIdServlet?id=${brand.id}">修改</a> <a href="#">删除</a></td>
    37. </tr>
    38. </c:forEach>
    39. </table>
    40. <script>
    41. document.getElementById("add").onclick = function (){
    42. location.href = "/brand-demo/addBrand.jsp";
    43. }
    44. </script>
    45. </body>
    46. </html>