我想从数据库里读出来的列表中颜色变化,一行深一行浅,应该怎么写?求命!
我想从数据库里读出来的列表中颜色变化,一行深一行浅,应该怎么写?求命!
<table>
<%
sql= "select * from myuser "
set rs=conn.execute(sql)
do while not rs.eof
%>
<tr>
<td align= "center "> <%=rs( "name ")%> </td>
</tr>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
</table>
------解决方案--------------------i=0
while
i%2=0 深
i%2=1 浅
i++
wend
------解决方案-------------------- <table>
<%
sql= "select * from myuser "
set rs=conn.execute(sql)
i=1
do while not rs.eof
if i%2=0
%>
<tr color= "浅色 ">
<%else%>
<tr color= "深色 ">
<%end if%>
<td align= "center "> <%=rs( "name ")%> </td>
</tr>
<%
i=i+1
rs.movenext
loop
rs.close
set rs=nothing
%>
</table>
------解决方案--------------------i=0
while
if i mod 2=o then
else
end if
i++
wend