---
title: "jstl forEach 创建table 多行多列"
author: "xuershan"
date: "2012-08-09T11:37:08Z"
tags: []
categories: ["Web前端"]
slug: "jstl-foreach-table"
draft: false
lastmod: "2012-08-09T11:38:23Z"
id: 1626500
url: "https://xuershan.iteye.com/blog/1626500"
---

```java


  <table border="1">
      <tr>
      <c:forEach items="${list}" var="p" varStatus="count">
      <td>

      <c:if test="${count.index%4==0&&count.index!=0}">
      <tr> </tr><td>
      </c:if>
       <img src="p.url">//html内容
      </td>
    </c:forEach>
      </tr>
        </table>


```