主题:  图片问题.头能弄晕了,.高手帮忙看一下

無㊣畏╃

职务:普通成员
等级:2
金币:1.0
发贴:371
#12004/12/10 21:53:26
这个图片链接怎么样才能让他点击图片弹出相对应的图片.现在状况是不管点那张图片总是跳出第一张,高手帮忙看一下,
if rs("picname"<>"" then
Dim picarray,pic
pic = rs("picname"
picarray = Split(pic,"|",-1)
str=replace(replace(str,"[img]","<div align='center'><a href=../soft/"&picarray(0)&" target=_blank><img align='center' vspace='5' hspace='10' border='0' onload='javascript:if(this.width>450){this.width=450}if(this.height>600){this.height=600}' src=../soft/","[/img]","></a></div><br>"
end if



沉默是金

职务:普通成员
等级:6
金币:11.2
发贴:4357
#22004/12/10 23:15:48
<a href=../soft/"&picarray(0)&"

你自己要他打开第一张图片的呀,
如果想点击哪张图片就弹出哪张图片的话,你还得加个FOR循环遍历一下,你上面已经split了,可以得到数组的下标的。


难人一个……

無㊣畏╃

职务:普通成员
等级:2
金币:1.0
发贴:371
#32004/12/11 17:48:00
对啊就是这个毛病.偶不会写那玩意,请指教一下了谢了



無㊣畏╃

职务:普通成员
等级:2
金币:1.0
发贴:371
#42004/12/11 17:56:08
for i to UBound(pic)
我放了这段话在里面可是错了,这个是上次一位朋友发我的
<%function ubb(str)
if rs("picname"<>"" then
Dim picarray,pic
pic = rs("picname"
picarray = Split(pic,"|",-1)
for i to UBound(pic)
str=replace(replace(str,"[img]","<div align='center'><img align='center' vspace='5' hspace='10' border='0' onload='javascript:if(this.width>450){this.width=450}if(this.height>600){this.height=600}' src=../soft/","[/img]","></div><br>"
end if
str=replace(replace(str,"","<b>","","</b>"
str=replace(replace(str,"","<i>","","</i>"
str=replace(replace(str,"","<u>","","</u>"
str=replace(replace(str,"
","<center>","
","</center>"
set re=new regexp
re.IgnoreCase =true
re.Global=True
re.Pattern="(\[URL=(.[^\[]*)\])(.[^\[]*)(\[\/URL\])"
str= re.Replace(str,"<A HREF=""$2"" TARGET=_blank>$3</A>"
ubb=str
end function%>



無㊣畏╃

职务:普通成员
等级:2
金币:1.0
发贴:371
#52004/12/11 18:40:05
偶又改了一下,这下没错了,可还是图片只显示第一张,

pic = rs("picname"
picarray = Split(pic,"|",-1)
For i = 1 to Ubound(picarray)
str=replace(replace(str,"[img]","<div align='center'><a href=../soft/"&picarray(0)&" target=_blank><img align='center' vspace='5' hspace='10' border='0' onload='javascript:if(this.width>450){this.width=450}if(this.height>600){this.height=600}' src=../soft/","[/img]","></a></div><br>"
exit for
next