给你个参考
<%
dim i,j,cl,a,b,num
num=11 '总记录数
Response.Write"<Table Border=0 Cellpadding=0 Cellspacing=1 Bgcolor='#ECECEC'><TR Bgcolor='#FFFFFF'>"
for i=1 to num
for a=1 to num-1 step 4
if a=i then
cl="#FF0000"
end if
next
for b=3 to num+1 step 4
if b=i then
cl="#000000"
end if
next
if i=num then
if num mod 4=1 then
cl="#FF0000"
end if
end if
for j=0 to 2
Response.Write"<Td width=50 height=30 align=center><font color="& cl &">"& i &"</font></Td>"
next
Response.Write"</Tr><Tr Bgcolor='#FFFFFF'>"
next
Response.Write"</Tr></Table>"
%>