关于<forEach>的<if>混合使用显示数据

<c:forEach items="${rankingList}" var="p" varStatus="status">
                     <div class="my-comment-list">
                        <div class="my-o-cons clearfix">
                            <div class="my-con-img" style="height: 18%;">
                                <c:if test="${not empty p.image}">
                                      <img src="${res}/upload/${p.wechatId}/${p.image}">
                                </c:if>
                                <c:if test="${empty p.image}">
                                      <img src="${res}/template/activityVote/wlmz/images/p.png">
                                </c:if>    
                                <div class="bian"><p>编号:${p.note2}</p></div>
                             </div>
                                 <div class="my-con-txtf">
                                       <p>${p.name}</p>
                                       <p class="f2">${p.danceTypes}</p>
                                 </div>
                                 <div class="two">
                                  <p>
                                    <span>
                                        <img src="${res}/template/activityVote/wlmz/images/p4.png">
                                    </span>
                                    ${p.freeAmount}
                                  </p>
                                  <p class="f2">
                                    <span>
                                       <img src="${res}/template/activityVote/wlmz/images/p5.png">
                                    </span>
                                     ${p.costAmount}
                                  </p>
                                </div>
                                <c:if test="${status.index==0}">
                                    <div class="fr">
                                       <img src="${res}/template/activityVote/wlmz/images/h1.png">
                                    </div>
                                </c:if>
                                <c:if test="${status.index==1}">
                                    <div class="fr">
                                       <img src="${res}/template/activityVote/wlmz/images/h2.png">
                                    </div>
                                </c:if>
                                <c:if test="${status.index==2}">
                                    <div class="fr">
                                       <img src="${res}/template/activityVote/wlmz/images/h3.png">
                                    </div>
                                </c:if>
                                <c:if test="${status.index>2}">
                                      <div class="fr">
                                         <p>第${status.index+1}名</p> 
                                      </div>
                                </c:if>
                             </div>
                         </div>
                                
                         <div class="fjx"></div>
                </c:forEach>

 

转载于:https://www.cnblogs.com/flytogalaxy/p/7220093.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值