我在c:foreach里面嵌套了两个同等级的c:foreach。嵌套在c:foreach里面的两个一直循环显示第一个数据
<divclass="moviemovie-testmovie-test-darkmovie-test-left"><c:forEachitems="${list}"va...
<div class="movie movie-test movie-test-dark movie-test-left">
<c:forEach items="${list}" var="m">
<div class="movie__images">
<a href="single.jsp" class="movie-beta__link">
<img alt="" src="<%=basePath %>upload/${m.MImgs}" class="img-responsive" alt=""/>
</a>
</div>
<div class="movie__info">
<a href="single.jsp" class="movie__title">${m.MName} </a>
<p class="movie__time">${m.MLength }</p>
<p class="movie__option">
<a href="single.jsp">${m.MReleaseTime }</a>
| <a href="single.jsp">
<c:forEach items="${lists}" var="ms">
${ms.TName}
</c:forEach></a>
| <a href="single.jsp">Drama</a></p>
<ul class="list_6">
<li><i class="icon1"> </i><p>2,548</p></li>
<li><i class="icon3"> </i><p>546</p></li>
<li>电影星级: <p><c:forEach items="${listls}" var="mls"><img src="<%=basePath %>upload/${mls.LDir}" alt=""></c:forEach> </p></li>
<div class="clearfix"> </div>
</ul>
</div>
<div class="clearfix"> </div>
</c:forEach>
</div> 展开
<c:forEach items="${list}" var="m">
<div class="movie__images">
<a href="single.jsp" class="movie-beta__link">
<img alt="" src="<%=basePath %>upload/${m.MImgs}" class="img-responsive" alt=""/>
</a>
</div>
<div class="movie__info">
<a href="single.jsp" class="movie__title">${m.MName} </a>
<p class="movie__time">${m.MLength }</p>
<p class="movie__option">
<a href="single.jsp">${m.MReleaseTime }</a>
| <a href="single.jsp">
<c:forEach items="${lists}" var="ms">
${ms.TName}
</c:forEach></a>
| <a href="single.jsp">Drama</a></p>
<ul class="list_6">
<li><i class="icon1"> </i><p>2,548</p></li>
<li><i class="icon3"> </i><p>546</p></li>
<li>电影星级: <p><c:forEach items="${listls}" var="mls"><img src="<%=basePath %>upload/${mls.LDir}" alt=""></c:forEach> </p></li>
<div class="clearfix"> </div>
</ul>
</div>
<div class="clearfix"> </div>
</c:forEach>
</div> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询