asp下循環(huán)一行多少個(gè)
更新時(shí)間:2008年07月25日 23:49:26 作者:
這個(gè)東西經(jīng)常要用到好東西 ,asp我們經(jīng)常需要輸出一行多少列
<%
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
%>
相關(guān)文章
asp下request.querystring("id")與request("id&quo
一下問題一天遇到2次,復(fù)制過來以供下次參考,一般來說還使用萬能的request("id")比較好2008-01-01
asp實(shí)現(xiàn)檢查ip地址是否為內(nèi)網(wǎng)或者私有ip地址的代碼分享
這篇文章主要介紹了asp實(shí)現(xiàn)檢查ip地址是否為內(nèi)網(wǎng)或者私有ip地址的代碼分享,給同樣在找IP判斷的使用,需要的朋友可以參考下2014-08-08
[ASP]RegExp對象提供簡單的正則表達(dá)式支持功能使用說明
[ASP]RegExp對象提供簡單的正則表達(dá)式支持功能使用說明...2007-07-07
在ASP中連接MySQL數(shù)據(jù)庫,最好的通過ODBC方法
在ASP中連接MySQL數(shù)據(jù)庫,最好的通過ODBC方法...2006-11-11
asp實(shí)現(xiàn)批量插入表單中的數(shù)據(jù)到數(shù)據(jù)庫的方法
asp實(shí)現(xiàn)批量插入表單中的數(shù)據(jù)到數(shù)據(jù)庫的方法...2007-08-08

