标题:高手帮我看看这段 动态图片连接 ASP代码
只看楼主
ghost958
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2008-10-20
 问题点数:0 回复次数:1 
高手帮我看看这段 动态图片连接 ASP代码
程序代码:
dim ClassP,ClassP_2
dim LoadPicP
Set tuijian=Server.CreateObject("Adodb.Recordset")
SqlT="select top 15 id,url,yl_dayin,yl_in,out,title from detail where topid>0 and yl_yesterin>100 order by out,id desc"
tuijian.open SQLT,conn,1,1
if tuijian.EOF and tuijian.BOF then
tuijianwww="暂时没有内容"
else
While (Not tuijian.EOF)
        for P=1 to 15
        ClassP=ClassP+1
        ClassP_2=(ClassP-1)*3+P
        LoadPicP=LoadPicP&"C_L"&ClassP_2&".src='css/pic/"&RndNumber((ClassP_2-1)*3+1,ClassP_2*3)&".gif';C_L"&ClassP_2&".className='loaded';"
        tuijianwww = tuijianwww &"<li><a href='"&SitePath&"open.asp?id="&tuijian("id")&"' target=_blank><img id=C_L"&ClassP_2&" src='css/load.gif' class='load' alt='"&tuijian("Title")&"'>"&tuijian("Title")&"</a></li> "
tuijian.MoveNext
        if tuijian.EOF then exit for
        next
Wend
end if
tuijian.close
Set tuijian = Nothing
strOut=Replace(strOut,"<{{tuijianwww}}>",tuijianwww)
LoadPicP="<script>"&LoadPicP&"</script>"




以上是我参照下边这段代码改的 但是 读取的 数据只有第一个图片显示 随即图片ID
后边的还是显示 css/load.gif 帮我看看问题出在哪里



程序代码:
dim IndexList,ClassList
dim ClassI,ClassI_2
dim LoadPic
Set feilei=Server.CreateObject("Adodb.Recordset")
Sql= "select classid,classname,pinyin from feilei"
feilei.open Sql,conn,1,1
if feilei.eof or feilei.bof then
IndexList="暂时没有栏目"
else
    Set IRS=Server.CreateObject("Adodb.Recordset")
    While (Not feilei.Eof)
    ClassI=ClassI+1
    
    if (ClassI mod 2)=1 then
        IndexList=IndexList&"<div style='clear:both;' class='film'>"
        IndexList=IndexList&"<div class='list' align='left' style='float:left;'>"
    else
        IndexList=IndexList&"<div class='list' align='left' style='float:right;'>"
    end if
    IndexList=IndexList&"<div class='top'> <img border='0' src='images/pic_arrow.gif'> <a href="&SitePath&"HTML/"&feilei("pinyin")&"_"&feilei("classid")&".htm target=_self>"&feilei("classname")&"</A></div><div class='c' align='center'>"
    
SqlT="select top 3 id,title from detail where verity=1 and yl_in*3>out and classid="&feilei("classid")&" order by yl_yesterin desc,yl_intime desc,id"
    IRS.open SQLT,conn,1,1
    if IRS.EOF or IRS.BOF then
    ClassList="暂时没有内容"
    else
        for i=1 to 3
        ClassI_2=(ClassI-1)*3+i
        LoadPic=LoadPic&"C_L"&ClassI_2&".src='css/pic/"&RndNumber((ClassI_2-1)*3+1,ClassI_2*3)&".gif';C_L"&ClassI_2&".className='loaded';"
        ClassList = ClassList &"<a href='"&SitePath&"open.asp?id="&IRS("id")&"' target=_blank><img id=C_L"&ClassI_2&" src='css/load.gif' class='load' alt='"&feilei("classname")&" "&IRS("Title")&"'>"&IRS("Title")&"</a> "
        IRS.MoveNext
        if IRS.EOF then exit for
        next
    end if
    IndexList=IndexList&ClassList&"</div></div>"
    ClassList=""

    if (ClassI mod 2)=0 then
        IndexList=IndexList&"</div>"
    end if

    IRS.close
    feilei.MoveNext
    Wend
    Set IRS = Nothing
    if (feilei.RecordCount mod 2)=1 then
        IndexList=IndexList&"</div>"
    end if
end if
feilei.Close
Set feilei=Nothing
strOut=Replace(strOut,"<{{IndexList}}>",IndexList)
LoadPic="<script>"&LoadPic&"</script>"





PS: 本人菜鸟 都是现学现卖 高手莫笑·~~
搜索更多相关主题的帖子: ASP 动态 代码 
2008-10-20 03:18
ghost958
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2008-10-20
得分:0 
没人帮我看看吗?
2008-10-20 13:50



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




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

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