高手帮忙,如何将下列函数改为显示为每行3张图片

来源:百度知道 编辑:UC知道 时间:2024/05/26 04:12:27
sub DownContent(intTitleLen)
dim i,strTemp
i=0
do while not rsDown.eof
strTemp=""
strTemp= strTemp & "<table width=166 border=0 cellspacing=3 cellpadding=0>"
strTemp= strTemp & "<TBODY>"
strTemp= strTemp & "<tr>"
strTemp= strTemp & "<td width=25% >"
strTemp= strTemp & "<div align=center><a href=DownloadShow.asp?ID=" & rsDown("id") & ">"
if isnull(rsDown("PhotoUrl")) then
strTemp= strTemp & "<img src='Img/nopic.gif' width='100' height='120' border='0'>"
else
strTemp= strTemp & "<img border=0 src=" & rsDown("PhotoUrl") & " width=100 height=120>"
end if
strTemp= strTemp & "<

试试看
主要就是
if i mod 3 = 0 then strTemp= strTemp & "</tr><tr>"

<% sub DownContent(intTitleLen)
dim i,strTemp
i=0
strTemp=""
strTemp= strTemp & "<table width=166 border=0 cellspacing=3 cellpadding=0>"
strTemp= strTemp & "<TBODY>"
strTemp= strTemp & "<tr>"

do while not rsDown.eof
if i mod 3 = 0 then strTemp= strTemp & "</tr><tr>"
strTemp= strTemp & "<td width=25% >"
strTemp= strTemp & "<div align=center><a href=DownloadShow.asp?ID=" & rsDown("id") & ">"
if isnull(rsDown("PhotoUrl")) then
strTemp= strTemp & "<img src='Img/nopic.gif' width='100' height='120' border='0'>"
else
strTemp= strTemp & "<img border=0 src=" & rsDown("PhotoUrl") & &q