lqxue

          常用鏈接

          統計

          book

          tools

          最新評論

          多列列表顯示

                                             
          結合struts的iterate tag+JSTL1.1實現多列列表的顯示。下面一段示例代碼中顯示的是2列,如果想顯示多列,則直接把2改成自己想顯示的列數即可。
          <%@ 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 閱讀(303) 評論(0)  編輯  收藏


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


          網站導航:
           
          主站蜘蛛池模板: 周口市| 元朗区| 宣武区| 漳州市| 离岛区| 江孜县| 永昌县| 泸西县| 惠来县| 博兴县| 四平市| 琼结县| 怀化市| 斗六市| 宾阳县| 乌兰浩特市| 邯郸县| 锦屏县| 班玛县| 巴林右旗| 万州区| 诸暨市| 周口市| 宁南县| 关岭| 洪洞县| 奉贤区| 醴陵市| 孝感市| 将乐县| 华安县| 巴林右旗| 江西省| 漠河县| 乌拉特中旗| 祁门县| 石河子市| 屏山县| 双城市| 山阴县| 府谷县|