爱wu痕 爱wu痕
关注数: 78 粉丝数: 63 发帖数: 10,306 关注贴吧数: 13
一段显示图片的代码,想让图片轮询显示怎么处理? <!--#include file = admin_conn.asp --> <!--#include file = titleb.asp --> document.write("<head><meta http-equiv=*Content-Language* content=*zh-cn*><meta http-equiv=*Content-Type* content=*text/html; charset=gb2312*></head>"); <% x=trim(request("x")) y=trim(request("y")) w=trim(request("w")) h=trim(request("h")) n=trim(request("n")) lm2=trim(request("lm2")) if n="" then n=20 n=int(n) open=trim(request("open")) font=trim(request("font")) if font="" then font=9 if open="1" then open="_blank" else open="_top" end if if w="" then w=100 if h="" then h=100 if x="" then x=1 if y="" then y=1 x=int(x) y=int(y) xy=x*y path="/news/" Set rs = Server.CreateObject("ADODB.RecordSet") rs.Open "select * from [config]",conn,1,1 if rs.recordcount<>0 then path=rs("path") end if rs.close set rs=nothing sql = "select top "&xy&" * from news where ( pic like *%.jpg%* or pic like *%.JPG%* or pic like *%.gif%* or pic like *%.GIF%* ) and sh=1 " if lm2<>"0" then sql=sql&" and (lm=*"&lm2&"* or lm2=*"&lm2&"* or lm3=*"&lm2&"*) " sql=sql&" order by ontop desc , updat desc , id desc" Set rs = Server.CreateObject("ADODB.RecordSet") rs.Open sql,conn,1,1 %> document.write("<div align=center>"); document.write("<table border=0 cellpadding=0 cellspacing=0 width=100% id=tableasdaDF1>"); <% if rs.recordcount<>0 then for yyyy=1 to y %> document.write("<tr>"); <% if rs.eof then exit for for xxxx=1 to x if n<>0 then ttt="<BR><font color="&rs("titlecolor")&">"&titleb(rs("title"),n)&"</font>" end if id=rs("id") title=rs("title") pic=rs("pic") pic=replace(pic,"border=","bo=") %> document.write("<td align=center style=*font-size:<%=font%>pt;line-height:150%*><a href=<%=path%><%=hrefID(rs("ID"),rs("filename"))%> target=*<%=open%>* title=*<%=title%>*><img border=0 width=<%=w%> height=<%=h%> src=<%=pic%>><font style=*font-size:<%=font%>pt*><%=ttt%></font></a></td>"); <% rs.movenext if rs.eof then exit for next %> document.write("</tr>"); <% next else %> document.write("暂无图片信息"); <% end if %> document.write("</table>"); document.write("</div>");
1 下一页