关于ASP循环显示的问题!!大家帮我解决一下

2025-12-15 12:26:05
推荐回答(1个)
回答1:

sub home_news_img()
set rs = conn.execute("select top 2 tp,bt,html from news where lbid in(1,2,3,4,5,6) and zt=1 and lx=1 order by id desc")
i=0
Response.Write "

"
Response.Write ""
Response.Write "")
end if
rs.movenext
loop
Response.Write "
"
do while not rs.eof
Response.Write "
"&_
""&_
"

height=21 align='center' style='LEFT: 0px; WIDTH: 100%; WORD-WRAP: break-word'>"&_
""&rs("bt")&""&_
"
"
i=i+1
if i mod 4 =0 then '4就是4列显示
response.Write("
"
rs.close
set rs=nothing
end sub