| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 466 人关注过本帖
标题:菜鸟请教:最新产品调用问题
只看楼主 加入收藏
baiyun88
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2009-11-24
结帖率:0
收藏
已结贴  问题点数:20 回复次数:1 
菜鸟请教:最新产品调用问题
程序代码:
<% 
                                                     
          StrSQL="select top 20 * from products where Recommend='1' order By PubDate desc"
         oConnRs.Open StrSQL,oConn,1,1 
         lCnt= oConnRs.RecordCount

              Response.Write"<DIV id=demo7 style='OVERFLOW: hidden; WIDTH: 671px; COLOR: #ffffff'><table border='0' cellpadding='0' >"
              Response.Write "<tr valign='top'>"
              Response.Write "<td id=demo3 valign='top' ><table  border='0' cellspacing='3'><tr valign='top'>"

          while not oConnRs.eof 
          Response.Write "<td width='120' valign='top' >"
          
         
Response.Write "      <table width=""160"" border=""0"" cellpadding=""0"" cellspacing=""0"" class='unnamed2'>"
Response.Write "      <tr>"
Response.Write "        <td height=""90"" align=""center"" valign=""bottom"" >"
Response.Write "<table width='120' height='100' border='0' cellpadding='0' cellspacing='1' bgcolor='#CCCCCC' class='unnamed1'><tr><td align='center' valign='middle' bgcolor='#FFFFFF'>"
      
Response.Write "<a href=show.asp?id=" &oConnRs("ID")& " target=""_blank"" ><img width='150' height='113' id=ht"&oConnRs("id")&"  src='"&ImgURL(oConnRs("ImgSrc2"))&"'  border=0 ></a>"
Response.Write "</td></tr></table></td>"
Response.Write "      </tr>"
Response.Write "      <tr>"
Response.Write "        <td height=""20"" align=""center"" valign=""middle""><a href=show.asp?id=" &oConnRs("ID")& " target=""_blank"" class=""t2"" >"&oConnRs("ProduceID")&"</a></td>"
Response.Write "      </tr> <tr><td height=""20""  align=""center"" valign=""middle""><a href=show.asp?id=" &oConnRs("ID")& " target=""_blank"" class=""t2"" >"&oConnRs("name")&"</a></td></tr>"
Response.Write "    </table>"


Response.Write "</td>"

            

              oConnRs.movenext
            
          wend
          Response.Write "</tr></table></td><td id=demo4 valign='top' ></td></tr>"
          Response.Write "</table></div>"

          oConnRs.Close
          %>
这个首页最新产品调用的代码,显示是一行的,如果把他改成 一列 4个产品  分5行呢?希望告诉指点一下,谢谢。
搜索更多相关主题的帖子: top products ffffff border 
2009-11-24 11:07
孤独冷雨
Rank: 10Rank: 10Rank: 10
来 自:安徽滁州
等 级:贵宾
威 望:23
帖 子:1247
专家分:1909
注 册:2007-6-4
收藏
得分:20 
<%
                                                     
          StrSQL="select top 20 * from products where Recommend='1' order By PubDate desc"
         oConnRs.Open StrSQL,oConn,1,1
         if not oConnRs.eof then
        

              Response.Write"<DIV id=demo7 style='OVERFLOW: hidden; WIDTH: 671px; COLOR: #ffffff'><table border='0' cellpadding='0' >"
              Response.Write "<tr valign='top'>"
              Response.Write "<td id=demo3 valign='top' ><table  border='0' cellspacing='3'>"
                  j=1
              Response.Write "<tr valign='top'>"
                  for i=1 to 20
          Response.Write "<td width='120' valign='top' >"
         
         
Response.Write "      <table width=""160"" border=""0"" cellpadding=""0"" cellspacing=""0"" class='unnamed2'>"
Response.Write "      <tr>"
Response.Write "        <td height=""90"" align=""center"" valign=""bottom"" >"
Response.Write "<table width='120' height='100' border='0' cellpadding='0' cellspacing='1' bgcolor='#CCCCCC' class='unnamed1'><tr><td align='center' valign='middle' bgcolor='#FFFFFF'>"
      
Response.Write "<a href=show.asp?id=" &oConnRs("ID")& " target=""_blank"" ><img width='150' height='113' id=ht"&oConnRs("id")&"  src='"&ImgURL(oConnRs("ImgSrc2"))&"'  border=0 ></a>"
Response.Write "</td></tr></table></td>"
Response.Write "      </tr>"
Response.Write "      <tr>"
Response.Write "        <td height=""20"" align=""center"" valign=""middle""><a href=show.asp?id=" &oConnRs("ID")& " target=""_blank"" class=""t2"" >"&oConnRs("ProduceID")&"</a></td>"
Response.Write "      </tr> <tr><td height=""20""  align=""center"" valign=""middle""><a href=show.asp?id=" &oConnRs("ID")& " target=""_blank"" class=""t2"" >"&oConnRs("name")&"</a></td></tr>"
Response.Write "    </table>"


Response.Write "</td>"

            

                              if (j mod 4)=0 then
                              response.Write "</tr><tr>"
                                end if
                                j= j + 1
                                oConnRs.movenext
                                if oConnRs.eof then exit for
                                next
                           
            
        
          Response.Write "</tr></table></td><td id=demo4 valign='top' ></td></tr>"
                        
        end if
                           
          Response.Write "</table></div>"

          oConnRs.Close
          %>
  

这里有男女系列成人用品,有时间兄弟们来看一看.
51za.
2009-11-24 14:17
快速回复:菜鸟请教:最新产品调用问题
数据加载中...
 
   



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

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