asp循环行数输出函数

2019-04-01 23:13:15于海丽

rs.Open sql,conn,1     

i=1    
do while not rs.eof     
%>  <td align="center" height="98">    
    <a href="show.asp?id=<%=rs("id")%>">    
    <img src="<%=rs("pic")%>" width="150" height="98" alt="<%=rs("name")%>" /></a>    
  </td>    
<%     
if i mod 3 = 0 then     
Response.Write("</tr><tr>")     
end if     
i=i+1     
if i>p then exit do     
rs.movenext     
Loop     
rs.close     
set rs=nothing    
%> 

您可能感兴趣的文章:

详细讲解ASP脚本循环语句asp经常被忽视的一种死循环asp下循环一行多少个asp.net for循环语句asp.net使用for循环实现Datalist的分列显示功能asp.net下无法循环绑定投票的标题和选项的解决方法asp.net中for和do循环语句用法分享asp中用for循环的一个小技巧asp中for循环的使用方法asp循环语句总结