标题:图片幻灯片显示问题
只看楼主
moteheart1
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2008-8-12
 问题点数:0 回复次数:0 
图片幻灯片显示问题
麻烦问一下
我定义了一个getimg()函数
获得数据库里的图片
现在想让图片用幻灯片显示
该怎么写?
Sub getimg()
dim rs_img,sql_img,row_count,str
set rs_img=server.createobject("adodb.recordset")
sql_img="select top 4 * from Bs_xw order by ID desc"
rs_img.open sql_img,conn,1,1
    Response.Write "<table width=100% border=0 cellspacing=2 cellpadding=0><TR><TD></TD></TR>"

    row_count=1
     Response.Write "<TR align=""center"">"
     Do While Not rs_img.EOF
            str=""
            str=str & "<TD>"
            str=str & "<table width=130 border=0 cellpadding=0 cellspacing=0>"
            str=str & "<TR><TD height=3></TD></TR>"

            str=str & "<tr>"
            str=str & "<td width='98%'><div align=center>"
            str=str & "<a href='showimg.asp?ID="& rs_img("id") &"' title='" & rs_img("title") &"'>"
            str=str & "<img border=0 src='"& rs_img("Img") &"' width=200 height=195></a><br>"
            str=str & ""& rs_img("title") &""
            str=str & "</div></td>"
            str=str & "</tr>"
            str=str & "</table></TD>"
            Response.Write str

        if row_count mod 10 <>0 then
        end if
        if row_count mod 10 =0 then
        Response.Write "</TR><TR>"
        end if

        rs_img.MoveNext
    row_count=row_count+1
    Loop

rs_img.close
 Response.Write "</TR><TR><TD></TD></TR></Table>"
set rs_img=nothing
END Sub
搜索更多相关主题的帖子: 幻灯片 
2008-08-18 15:48



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-228878-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.082337 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved