/ Published in: ASP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
'************************************************ ' ' To use it put the code like this on your loop: ' ' <%counter = counter + 1%> ' <tr bgcolor="<%=Acolor(counter,"#a0a0a0","#e0e0e0")%>"> ' <td>Data</td> ' </tr> ' ' n is the external counter ' col is the first color in hex format ' col2 is the second color in hex format, you can leave it empty '************************************************ function Acolor(n,col,col2) num = 0 num = n mod 2 if col2 = "" then col2 = "#ffffff" if num = 0 then Acolor = col else Acolor = col2 end if end function
Comments
