asp表格循环问题

来源:百度知道 编辑:UC知道 时间:2024/06/10 01:22:12
图片为pc1,pc2,pc3.....pc24
用表格循环出来简单写法。五行四列。
中间有if rs("pc1")=""then response.write("此位没有图片")else
<%=rs("pc1")%>其中pc1部分是要循环读出的。
我想到几个方法。但都不成功,有熟练的高手写出代码给俺看看,谢谢。

dim w,h
dim i,j
dim id
h=5'五行
w=4'四列

for i=1 to h
for j=1 to w
id=(h-1)*w+j
if rs("pc"&id)="" then
response.write("此位没有图片")
else
<%=rs("pc"&id)%>
end if
next
next