日期:2014-05-16 浏览次数:20584 次
<c:forEach items="${list2.classifyList}" var="list3"> //最外面循环
<c:set var="isDoing" value="0"/>?//在里面循环外赋值
??????????
<c:forEach items="${spcList}" var="spcList" varStatus="i" > //第二层循环
????????????
<c:if test="${spcList.classifyid==list3.serialnumber}"> //判断相等后根据ID显示名称
?????????????
?<input type="checkbox" name="classify" value="${list3.serialnumber}" checked>${list3.name}
?????????? ??
?<c:set var="isDoing" value="1"/> //赋值跳出循环
????????????
</c:if>????????? ?
??????????
</c:forEach>
??????????
?<c:if test="${isDoing!='1'}"> //如果等于赋的值显示最外面循环内容
????????????
?<input type="checkbox" name="classify" value="${list3.serialnumber}">${list3.name}
??????????
</c:if>
</c:forEach>