asp下循环一行多少个
更新时间:2008年07月25日 23:49:26 作者:
这个东西经常要用到好东西 ,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" alt="<%=rs("name")%>" /></a>
</td>
<%
if i mod 5 = 0 then
Response.Write("</tr><tr>")
end if
i=i+1
rs.movenext
Loop
rs.close
set rs=nothing
%>
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" alt="<%=rs("name")%>" /></a>
</td>
<%
if i mod 5 = 0 then
Response.Write("</tr><tr>")
end if
i=i+1
rs.movenext
Loop
rs.close
set rs=nothing
%>
相关文章
asp下request.querystring("id")与request("id&quo
一下问题一天遇到2次,复制过来以供下次参考,一般来说还使用万能的request("id")比较好2008-01-01
[ASP]RegExp对象提供简单的正则表达式支持功能使用说明
[ASP]RegExp对象提供简单的正则表达式支持功能使用说明...2007-07-07


最新评论