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
%>
您可能感興趣的文章:
- 詳細(xì)講解ASP腳本循環(huán)語(yǔ)句
- asp經(jīng)常被忽視的一種死循環(huán)
- asp循環(huán)行數(shù)輸出函數(shù)
- asp.net for循環(huán)語(yǔ)句
- asp.net使用for循環(huán)實(shí)現(xiàn)Datalist的分列顯示功能
- asp.net下無(wú)法循環(huán)綁定投票的標(biāo)題和選項(xiàng)的解決方法
- asp.net中for和do循環(huán)語(yǔ)句用法分享
- asp中用for循環(huán)的一個(gè)小技巧
- asp中for循環(huán)的使用方法
- asp循環(huán)語(yǔ)句總結(jié)
相關(guān)文章
ASP 循環(huán)導(dǎo)入導(dǎo)出數(shù)據(jù)處理 不使用緩存
非常不錯(cuò),大家可以自己應(yīng)用下。2009-01-01
ASP 相關(guān)文章或者相關(guān)產(chǎn)品
以下僅提供相關(guān)思路和關(guān)鍵代碼,并且只提供一種最簡(jiǎn)單的算法實(shí)現(xiàn),稍復(fù)雜的本文不做介紹。2009-05-05
asp實(shí)現(xiàn)限制一個(gè)ip只能訪問(wèn)一次的方法
這篇文章主要介紹了asp實(shí)現(xiàn)限制一個(gè)ip只能訪問(wèn)一次的方法,感興趣的小伙伴們可以參考一下2015-10-10
asp實(shí)現(xiàn)二進(jìn)制字符串轉(zhuǎn)換為Unicode字符串
asp實(shí)現(xiàn)二進(jìn)制字符串轉(zhuǎn)換為Unicode字符串...2007-08-08

