热门搜索 :
考研考公

for next循环

发布网友 发布时间:2022-04-21 06:15

我来回答

1个回答

热心网友 时间:2023-09-27 18:28

你再试试下面的,肯定对的,呵呵!
<% Sub Index_phh() %>
<%
set rs = server.CreateObject("adodb.recordset")
sql = "select * from big where id=1 or id=2 or id=10 or id=11 or id=12 or id=13 or id=14 or id=15 or id=16 or id=17 order by id asc"
rs.open sql,cnn,1,1
if not rs.eof then
%><table width="95%" border="0" cellpadding="0" cellspacing="0" background="images/h-7.gif">
<% do while not rs.eof %>
<tr>
<% dim i
for i=1 to 2
i=i+1
if not rs.eof then
%>
<td height="27" align="left" valign="middle">
<a href="pro_class.asp?str=<%=rs("id")%>">·<%=Rs("bigclass") %></a></td>
<%rs.movenext
end if
next %>
</tr>
<%
loop
%>
</table>
<%
end if
rs.close
set rs = nothing
%>
<% End Sub %>
声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。
E-MAIL:11247931@qq.com
Top