草窩兒
          我的地盤(pán)兒
          posts - 4,  comments - 13,  trackbacks - 0
          list傳值,每4列換行顯示,代碼如下:
           1<div id="orgsDiv">
           2    <c:set var="j" value="0" />
           3    <c:set var="type" value="" />
           4    <c:forEach items="${orgs}" var="org" varStatus="i">
           5        <c:if test="${type != org.type && i.index!=0}">
           6            <c:forEach begin="${j%4}" end="3">
           7                    <td width="25%">&nbsp;</td>
           8            </c:forEach>
           9            </tr>
          10            </table>
          11            <hr width="100%" style="border: 1px solid #cadae8; height: 1px">
          12        </c:if>
          13        <c:if test="${type != org.type }">
          14            <c:set var="j" value="0" />
          15            <table border="0" width="100%" cellpadding="0" cellspacing="0">
          16        </c:if>
          17        <c:if test="${j%4 == 0}">
          18            <tr>
          19        </c:if>
          20        <td width="25%">
          21            <html:multibox property="orgIds">${org.id}</html:multibox>
          22            <c:out value="${org.shortName}" />
          23        </td>
          24        <c:if test="${(i.last) || (j%4 == 3)}">
          25            <c:if test="${i.last}">
          26                <c:forEach begin="${i.index%4}" end="2">
          27                    <td width="25%">&nbsp;</td>
          28                </c:forEach>
          29            </c:if>
          30            </tr>
          31            <c:if test="${i.last}">                            
          32                </table>
          33            </c:if>    
          34        </c:if>
          35        <c:set var="j" value="${j+1}" />
          36        <c:set var="type" value="${org.type}" />
          37    </c:forEach>
          38</div>
          posted on 2008-01-18 16:44 芨芨草 閱讀(535) 評(píng)論(1)  編輯  收藏 所屬分類(lèi): JSP

          FeedBack:
          # re: 換行顯示
          2008-11-29 13:20 | cvcb
          [movie=http://xiaodi.any2000.com/x/i/xiaodi/fh/28.swf?mp3=音樂(lè)|音樂(lè)&g_url=這里是你的照片網(wǎng)址&titler=我的下一個(gè)生日&yy=2008&mm=6&dd=16&hh=00&autostart=1&autorepeat=1&]  回復(fù)  更多評(píng)論
            

          只有注冊(cè)用戶(hù)登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          想讓草兒飛上天 ...

          <2008年11月>
          2627282930311
          2345678
          9101112131415
          16171819202122
          23242526272829
          30123456

          常用鏈接

          留言簿

          隨筆分類(lèi)

          隨筆檔案

          文章分類(lèi)

          文章檔案

          Hibernate

          Oracle

          搜索

          •  

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          主站蜘蛛池模板: 紫阳县| 兴国县| 双辽市| 孙吴县| 耿马| 福海县| 贺兰县| 巴南区| 清水河县| 阆中市| 赤峰市| 乐陵市| 罗平县| 成安县| 兴和县| 辽阳县| 望奎县| 舒兰市| 武乡县| 娄底市| 曲周县| 阿勒泰市| 东山县| 金华市| 勃利县| 白玉县| 武平县| 饶平县| 阜南县| 昭通市| 晋中市| 团风县| 额济纳旗| 和政县| 东兰县| 通道| 鄄城县| 威信县| 页游| 安远县| 阆中市|