| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 705 人关注过本帖
标题:asp首页显示产品数量问题
只看楼主 加入收藏
muchun256726
Rank: 1
等 级:新手上路
帖 子:13
专家分:0
注 册:2011-6-28
结帖率:0
收藏
已结贴  问题点数:20 回复次数:7 
asp首页显示产品数量问题
<table width="100%"  border="0" cellpadding="2" cellspacing="1" bgcolor="#ffb888" class="margintop">
              <tr>
                <td height="24" background="images/box_bg.gif" class="leftbiaoti">最新产品</td>
              </tr>
              <tr>
                <td align="center" valign="middle" bgcolor="#FFFFFF" class="youbiantiachong"><%
set newsproducts=server.createobject("adodb.recordset")
exec="select top "&config("synewsproducts")&" * from  [products] "
newsproducts.open exec,conn,1,1
if newsproducts.eof and newsproducts.bof then
response.Write("&nbsp;暂无最新产品 !")
end if%>
<table width="115" border="0" cellpadding="0" cellspacing="0">
<tr>
<%
dim i
i=1
do while not newsproducts.eof and i<=6
%>
  <td>
        <table width="100%" border="0" cellpadding="5" cellspacing="1">
         
          <tr>
            <td><div align="center"><a href="Productsviwe.asp?id=<%=newsproducts("id")%>" class="img" title="<%=newsproducts("title")%>"><img src="<%=newsproducts("img")%>" width="120" height="90" /></a></div></td>
          </tr>
          <tr>
            <td><div align="center"><a href="Productsviwe.asp?id=<%=newsproducts("id")%>" title="<%=newsproducts("title")%>"><%=InterceptString(newsproducts("title"),18)%></a></div></td>
          </tr>
        </table>  </td>
<%
if i mod 6 =0 then
response.Write "<tr>"
end if
i=i+1
newsproducts.movenext
loop
newsproducts.close
set newsproducts=nothing
%>
</tr>
</table></td>
              </tr>
            </table>





do while not newsproducts.eof and i<=6
改为1显示1个产品,改为2显示2个产品,……改为6还是显示5个产品
最终显示的是5个产品,我想显示6个。
要怎么改呢?》
搜索更多相关主题的帖子: 产品 background images border 
2011-06-28 11:17
muchun256726
Rank: 1
等 级:新手上路
帖 子:13
专家分:0
注 册:2011-6-28
收藏
得分:0 
如果可以加Q帮忙下。。。

我的QQ: 15四五六六797
2011-06-28 11:18
muchun256726
Rank: 1
等 级:新手上路
帖 子:13
专家分:0
注 册:2011-6-28
收藏
得分:0 
马上就沉了。。
2011-06-28 13:04
huizia
Rank: 3Rank: 3
等 级:论坛游侠
帖 子:34
专家分:179
注 册:2011-6-21
收藏
得分:5 
应该是css式样表定义了大小,最多只能显示5条,改,只能改下css吧
2011-06-28 13:25
dzt0001
Rank: 13Rank: 13Rank: 13Rank: 13
等 级:蒙面侠
威 望:5
帖 子:1281
专家分:4998
注 册:2005-10-12
收藏
得分:5 
select top "&config("synewsproducts")&" ...

应该网站后台有个设置的,synewsproducts控制显示条数,去找找

----我怎能在别人的苦难面前转过脸去----
2011-06-28 13:58
kombel
Rank: 2
等 级:论坛游民
帖 子:69
专家分:48
注 册:2011-6-15
收藏
得分:5 
我有一个分页排版的  要不要  
2011-06-29 15:39
muchun256726
Rank: 1
等 级:新手上路
帖 子:13
专家分:0
注 册:2011-6-28
收藏
得分:0 
我把产品显示格式改大了。就让它显示5个。。。

还是找不着解决的方法。。晚点再研究下。。

谢谢上面的大侠们·
2011-06-30 11:12
nicechlk
Rank: 3Rank: 3
等 级:论坛游侠
威 望:4
帖 子:330
专家分:187
注 册:2008-9-6
收藏
得分:5 
<%
if i mod 6 =0 then
response.Write "<tr>"
end if
i=i+1
newsproducts.movenext
loop
newsproducts.close
set newsproducts=nothing
%>
是这儿的问题吧?
if i mod 7=0 then。。。试试

莫以善小而不为,莫以恶小而为之!
2011-07-04 00:45
快速回复:asp首页显示产品数量问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.022506 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved