日期:2014-05-17  浏览次数:20678 次

怎么用<c:if判断两个<c:forEach里的数据是否相等?
<c:forEach var="moretzgglist" items="${moretzgglist}" varStatus="currentCount">
<div id="Leftnr">
<div id="nrtb"><img src="../images/fenye1_16.jpg" /></div>
<div id="nrbt"><a href="../Tzgg/ShowTzgg.jsp?id=${moretzgglist.id}" target="_blank">${moretzgglist.b_title}</a></div>
<div id="nrsj">${moretzgglist.b_time}</div>
<c:forEach var="NewTzggList" items="${NewTzggList}" varStatus="currentCount">
<c:if test="${moretzgglist.id}==${NewTzggList.id}">

</c:if>
</c:forEach>
</div>
</c:forEach>

------解决方案--------------------
应该是:
<c:if test="${moretzgglist.id==NewTzggList.id}">
AAA
</c:if>