zoukankan      html  css  js  c++  java
  • 关于<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>
  • 相关阅读:
    [OpenJudge] 反正切函数的应用 (枚举)(数学)
    [OpenJudge] 摘花生 (模拟)
    [OpenJudge] 宇航员(模拟)
    [OpenJudge] 显示器(模拟)
    背包问题
    BFS_最短路径
    链表
    网站
    网站
    洛谷_递归整理
  • 原文地址:https://www.cnblogs.com/flytogalaxy/p/7220093.html
Copyright © 2011-2022 走看看