高手帮我看看这段 动态图片连接 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: 本人菜鸟 都是现学现卖 高手莫笑·~~