denli8 发表于 2005-8-10 09:22:56

怎么把产品清单变成两列的?过程代码如下:

怎么把产品清单变成两列的?代码如下:

'=================================================
'过程名:ShowProductContent
'作用:显示产品列表中的数据(无修饰)
'参数:无
'=================================================
sub ShowProductContent(rsArticle)
    dim i,strTemp
    i=0
do while not rsArticle.eof
strTemp = ""
'strTemp = strTemp & ""
strTemp= strTemp & "<table width=100% border=0 cellspacing=3 cellpadding=0>"
                strTemp= strTemp & "<tr>"
                strTemp= strTemp & "<td width=25% rowspan=4>"
                strTemp= strTemp & "<div align=center><a href=productInfo.asp?productId=" & rsArticle("ProductID") & ">"
                strTemp= strTemp & "<img border=0 src=" & rsArticle("DefaultPicUrl") & " height=80>"
                strTemp= strTemp & "</a></div></td>"
                strTemp= strTemp & "<td width=12% height=18>"
                strTemp= strTemp & "</td>"
                strTemp= strTemp & "<td>"
                strTemp= strTemp & ""
                strTemp= strTemp & "</a></td>"
                strTemp= strTemp & "</tr><tr>"
                strTemp= strTemp & "<td height=18>"
                strTemp= strTemp & "产品名称:</td>"
                strTemp= strTemp & "<td><a href=productInfo.asp?ProductID=" & rsArticle("ProductID") & ">" & rsArticle("Name") & ""
                strTemp= strTemp & "</tr><tr>"
                strTemp= strTemp & "<td height=18>"
                strTemp= strTemp & "产品类别:</td>"
                strTemp= strTemp & "<td><a href=Product.asp?type=" & rsArticle("typeid") & ">" & rsArticle("TypeName") & "</a> </td> "
                strTemp= strTemp & "</tr><tr>"
                strTemp= strTemp & "<td height=18>产品信息:</td>"
                strTemp= strTemp & "<td>"
                strTemp= strTemp & "<a href=productInfo.asp?ProductID=" & rsArticle("ProductID") & "><img src=Img/arrow_7.gif border=0></a></td>"
                strTemp= strTemp & "</tr><tr>"
                strTemp= strTemp & "<td colspan=2>"
                strTemp= strTemp & "<table width=100% border=0 cellpadding=0 cellspacing=0>"
                strTemp= strTemp & "</table>"
                strTemp= strTemp & "</td>"
                strTemp= strTemp & "</tr><tr>"
                strTemp= strTemp & "<td height=1 colspan=3 bgcolor=#86BBF7></td>"
                strTemp= strTemp & "</tr>"
                strTemp= strTemp & "</table>"
Response.Write strTemp
rsArticle.movenext
i=i+1
if i>=conMaxPerPage_Default Then exit do
loop
end sub

'==============================================================

谢谢大家了!
我应该更改哪两句?或者在哪儿添加 If i mod 2=0 这句?
谢谢了,大致我是知道的,可就是调试不成功,烦请您帮我修改一份好吗?
万分感激不尽!我是新手!

涩兔子 发表于 2005-8-10 09:25:28

这是传说中的ASP :shock:

jiangtao9999 发表于 2005-8-10 18:16:59

:?:
页: [1]
查看完整版本: 怎么把产品清单变成两列的?过程代码如下: