jstl forEach 创建table 多行多列


  <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>

你可能感兴趣的:(foreach,jstl)