日期:2014-05-18  浏览次数:20918 次

iterator 循环 tr td 如何循环成3行4列有代码
<s:iterator value="list" id="cc" status="st"> 
  <table width="143" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
  <td align="center" style="padding-top:10px;">
   
  <s:if test="#cc=='by'">
  <div style="float:left;padding:2px;margin-right:5px;margin-left:10px;margin-bottom:10px;">
<table width="143" height="125" border="0" cellpadding="0" cellspacing="0" background="./website_img/shop/shopIMG2.png">
<tr>
<td align="center" style="padding-top:10px;"><img src="images/star/by.jpg" width="64" height="65"/></td>
</tr>
<tr>
<td align="center"><div id="div" style="font-weight:bold;"> <a style="cursor:default" >白羊座</a></div></td>
</tr>
</table>
</div>
  </s:if>
  <s:elseif test="#cc=='jn'">
  <div style="float:left; padding:2px;margin-right:5px;margin-left:10px;margin-bottom:10px;">
<table width="143" height="125" border="0" cellpadding="0" cellspacing="0" background="./website_img/shop/shopIMG2.png">
<tr>
<td align="center" style="padding-top:10px;"><img src="images/star/jn.jpg" width="64" height="65"/></td>
</tr>
<tr>
<td align="center"><div id="div" style="font-weight:bold;"> <a style="cursor:default" >金牛座</a></div></td>
</tr>
</table>
</div>
</s:elseif>
  <s:elseif test="#cc=='szz'">
  <div style="float:left; padding:2px;margin-right:5px;margin-left:10px;margin-bottom:10px;">
<table width="143" height="125" border="0" cellpadding="0" cellspacing="0" background="./website_img/shop/shopIMG2.png">
<tr>
<td align="center" style="padding-top:10px;"><img src="images/star/szz.jpg" width="64" height="65"/></td>
</tr>
<tr>
<td align="center"><div id="div" style="font-weight:bold;"> <a style="cursor:default" >双子座</a></div></td>
</tr>
</table>
</div>
</s:elseif>
  <s:elseif test="#cc=='jx'">
  <div style="float:left; padding:2px;margin-right:5px;margin-left:10px;margin-bottom:10px;">
<table width="143" height