asp的缺少loop问题

来源:百度知道 编辑:UC知道 时间:2024/07/13 02:05:41
<table width="710" >
<%set rs= conn.execute("select top 19 * from News where bigclassname='企业新闻' or bigclassname='业内资讯' ")
if (not rs.eof) then
Response.Write("新闻中心<br>")
dim s
s=0
do while not rs.eof
if s mod 2=0 then color="red"
else color="blue"
loop
%>
<tr bgcolor="<%=color%>">
<td><div align="left"><img src="Images/bg_0rtop.gif">  <a href="showNews.asp?id=<%= rs("id")%>" target="_blank"><span class="STYLE7"><%=rs("title")%></span></a></div>
</td>
<%
s=s+1
rs.movenext
loop
%>
<%else
ShowMessage"数据显示错误",""
end if

<table width="710" >
<%set rs= conn.execute("select top 19 * from News where bigclassname='企业新闻' or bigclassname='业内资讯' ")
if (not rs.eof) then
Response.Write("新闻中心<br>")
dim s
s=0
do while not rs.eof
if s mod 2=0 then color="red"
else color="blue"
%>
<tr bgcolor="<%=color%>">
<td><div align="left"><img src="Images/bg_0rtop.gif"> <a href="showNews.asp?id=<%= rs("id")%>" target="_blank"><span class="STYLE7"><%=rs("title")%></span></a></div>
</td>
</tr><%
s=s+1
rs.movenext
loop
%>
<%else
ShowMessage"数据显示错误",""
end if
%>
</table>

if s mod 2=0 then color="red"