首页 新闻 会员 周边 捐助

请问如何实现表格的隔行显示颜色。!

0
悬赏园豆:10 [已关闭问题] 关闭于 2009-12-04 11:40

RT,我的代码如下:<table width="100%" border="0" align="left" id="getColor" onload="getcolor();">
                     {#foreach $T.d as record}
                    <tr class="trColor" style="background-color:$bcolor">
                      <td width="6%" align="center" valign="middle" ><img src="images/20061117000350390.gif" width="4" height="7" /></td>
                      <td width="10%" align="left" valign="baseline"><nobr><a style="width:38px" title="{$T.record.PersonName}" class="a1" href="PersonCenter_Other.aspx?pid={$T.record.Id}">{$T.record.PersonName}</a></nobr></td>
                   <td width="8%" align="left" valign="baseline"><nobr><a style="width:18px" title="{$T.record.Sex}" class="a2" href="users/Person_Preview.aspx?pid={$T.record.Id}">{$T.record.Sex}</a></nobr></td>
                   <td width="9%" align="left" valign="baseline"><nobr><a title="{$T.record.Age}" class="a3" href="users/Person_Preview.aspx?pid={$T.record.Id}">{$T.record.Age}</a></nobr></td>
                   <td width="17%" align="left" valign="baseline"><nobr><a style="width:42px" title="{$T.record.Educational}" class="a4" href="users/Person_Preview.aspx?pid={$T.record.Id}">{$T.record.Educational}</a></nobr></td>
                   <td width="16%" align="left" valign="baseline"><nobr><a style="width:70px" title="{$T.record.WorkDays}" class="a5" href="users/Person_Preview.aspx?pid={$T.record.Id}">{$T.record.WorkDays}</a></nobr></td>
                   <td width="17%" align="left" valign="baseline"><nobr><a style="width:80px"title="{$T.record.Function}" class="a6" href="users/Person_Preview.aspx?pid={$T.record.Id}">{$T.record.Function}</a></nobr></td>
                   <td width="17%" align="left" valign="baseline"><nobr><a style="width:70px" title="{$T.record.Residence2}" class="a7" href="users/Person_Preview.aspx?pid={$T.record.Id}">{$T.record.Residence2}</a></nobr>   </td>
                    </tr>
                    {#/for}
                  </table>

 

哪位大哥能给出JS的解决代码啊,~

Apology、的主页 Apology、 | 初学一级 | 园豆:190
提问于:2009-12-04 09:46
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册