首页 > 编程 > ASP > 正文

asp下循环一行多少个

2024-05-04 11:09:20
字体:
来源:转载
供稿:网友
这个东西经常要用到好东西 ,asp我们经常需要输出一行多少列
 
 
 
<% 
set rs = server.createobject("adodb.recordset") 
sql = "Select * from friend order by id DESC" 
rs.Open sql,conn,1 
i=1 
do while not rs.eof 
%> <td align="left" height="50"> 
<a href="<%=rs("url")%>" target="_blank"> 
<img src="<%=rs("logo")%>" class="framed" width="88" height="31" /> </td> 
<% 
if i mod 5 = 0 then 
Response.Write("</tr><tr>") 
end if 
i=i+1 
rs.movenext 
Loop 
rs.close 
set rs=nothing 
%> 
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表