中国网管论坛's Archiver

PP 发表于 2006-7-11 16:01

急!!!!这个程序怎么换行?

[COLOR="Blue"]<table width=100% border=0 cellpadding=0 cellspacing=3 bgcolor="#00FF00" id="11">
                        <tr>
                          <%
set rs=server.createobject("adodb.recordset")
i=0
MaxShangpinList=2
rs.open "select  * from shop_snsn where newsshop=1 order by shopid desc",conn,1,1
%>
                          <%
do while not rs.eof
        i=i+1
%>//[/COLOR][COLOR="Red"]读取SNSN表中的shopid ,显示点击的两个最近推荐[/COLOR]                          <td align=center valign=middle><table width="98%" height="92" border="0" align="left" cellpadding="0" cellspacing="3" id="112">
                            <tr>
                              <td width="100" rowspan="4" align="center" valign="middle" background="images/picbj.gif[COLOR="Red"]"><a href=list.asp?id=<%=rs("shopid")%> <%if rs("sftc")="" then%><%else%> target=<%=rs("sftc")%><%end if%>>
                                <%if rs("shoppic")="" then
        response.write "<div align=center><a href=list.asp?id="&rs("shopid")&" ><img src=images/emptyshop.gif width=85 height=85 border=0></a></div>"
        else
    response.write "<img src="&rs("shoppic")&" alt="&rs("shopname")&"  width=85 height=85 border=0>"
    end if%>[/COLOR]                              </a></td>
                              <td align="center" valign="middle">&nbsp;</td>
                            </tr>
                            <tr>
                              <td width="122" align="center" valign="middle"><a href=list.asp?id=<%=rs("shopid")%> <%if rs("sftc")="" then%><%else%> target=<%=rs("sftc")%><%end if%>><font color="#3366CC">
                                <%if len(trim(rs("shopname")))>20 then
        response.write left(trim(rs("shopname")),20)&""
        else
        response.write trim(rs("shopname"))
        end if%>
                              </font></a></td>
                            </tr>
                            <tr>
                              <td align="center" valign="middle"><font color="#FF0000">会员价:<%=rs("huiyuanjia")%>元</font></td>
                            </tr>
                            <tr>
                              <td align="center" valign="middle"><font color="#FF0000">VIP价:<%=rs("Vipjia")%>元</font></td>
                            </tr>
                          </table>
</td>
                      [COLOR="blue"]    <%
        if (i mod (MaxShangpinList/2)=0) and i>=(MaxShangpinList/2) then
%>
        <%end if
        if i>=MaxShangpinList then exit do
rs.movenext
loop
%>[/COLOR]                        </tr>
                      </table>



以上蓝色的代码就是读取商品最新推荐的,可是我如果将MAXSHANGPINLIST 改为10,就会一排过去,超出页面,我希望效果是可以出现这样:
1 2
3 4
5 6
...
这样显示的.请高手指教!谢谢!和红色部分的代码有没有关系呢?
我老板要求要尽快的,帮帮忙啊,~!!

cj21828 发表于 2006-7-27 22:51

回复: 急!!!!这个程序怎么换行?

我网站有这功能的,不过代码好久没看了,等我看一下啊,

梦子颠 发表于 2006-8-10 07:20

回复: 急!!!!这个程序怎么换行?

给代码加点注释,再把你的页面发出来看一下!

tcg2000 发表于 2006-8-17 10:26

回复: 急!!!!这个程序怎么换行?

[COLOR=#ff0000]width=85 height=85 border 把这里的值改一下可能行[/COLOR]

tcg2000 发表于 2006-8-17 10:27

回复: 急!!!!这个程序怎么换行?

下一个同类网站看看代码

chinaphp 发表于 2006-8-24 19:21

回复: 急!!!!这个程序怎么换行?

...........

mycalf 发表于 2006-9-13 03:59

/n <br> 都是换行符

页: [1]

Powered by Discuz! Archiver 6.1.0  © 1999-2008 bbs.bitsCN.com