lqxue

          常用鏈接

          統(tǒng)計(jì)

          book

          tools

          最新評論

          多列列表顯示

                                             
          結(jié)合struts的iterate tag+JSTL1.1實(shí)現(xiàn)多列列表的顯示。下面一段示例代碼中顯示的是2列,如果想顯示多列,則直接把2改成自己想顯示的列數(shù)即可。
          <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

           1                                         <nested:iterate property="items" indexId="index">
           2                                                 <c:if test="${index%2==0}">
           3                                                 <tr>
           4                                                 </c:if>   
           5                                                     <td>
           6                                                         ${index}
           7                                                     </td> 
           8                                                 <c:if test="${(index+1)%2==0}">
           9                                                     </tr>
          10                                                 </c:if>
          11                                            
          12                                         </nested:iterate>

          posted on 2007-05-21 11:31 lqx 閱讀(308) 評論(0)  編輯  收藏


          只有注冊用戶登錄后才能發(fā)表評論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 防城港市| 卢龙县| 宁晋县| 平遥县| 安塞县| 阜康市| 班玛县| 贞丰县| 和硕县| 类乌齐县| 邹平县| 西青区| 德庆县| 基隆市| 莱阳市| 越西县| 昌都县| 嘉峪关市| 晋城| 安新县| 泰宁县| 葵青区| 霍林郭勒市| 平江县| 碌曲县| 旺苍县| 平舆县| 遵义县| 陆丰市| 班戈县| 阳谷县| 新平| 镇平县| 蚌埠市| 凤山市| 海阳市| 西和县| 德昌县| 卓资县| 海丰县| 商南县|