| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 4064 人关注过本帖
标题:怎么把这个变成横排的图片,原来的是竖排的
只看楼主 加入收藏
zzz5
Rank: 1
等 级:新手上路
帖 子:7
专家分:0
注 册:2008-11-27
收藏
 问题点数:0 回复次数:7 
怎么把这个变成横排的图片,原来的是竖排的
<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->
<%
dim catid,i,strcat
catid=SafeRequest("catid",1)
CatList =catid
PID = catid
         if catid="" or catid = 0 then
             conn.close
            set conn = Nothing
             response.Redirect "procat.asp"
            response.end
         end if
    
         set rs=server.CreateObject("adodb.recordset")
        do while not PID = 0
         rs.open "Select categoryid,category,ParentID From category Where categoryid="&PID,conn,1,1
        
         if rs.eof and rs.bof then
        response.Write "<script LANGUAGE='javascript'>alert('您输入的参数非法,请正确操作!');history.go(-1);</script>"
        rs.close
        set rs = Nothing
        conn.Close
        set conn=nothing
        response.end
        end if

         lstcat = "-&gt;<a href=cat.asp?catid="&rs("categoryid")&">"&rs("category")&"</a>"&lstcat
         catstr = ""&rs("category")&"-&gt;"&catstr
         CaID = PID
         CatN = rs("category")
         PID = rs("ParentID")
         rs.close
         loop
        
         rs.open "Select category,meta From category Where categoryid="&catid,conn,1,1
          strcat = rs("category")
          strmeta = rs("meta")
          strintro = rs("intro")
          rs.close
         set rs = Nothing        
         %>
<html>
<head>
<title>久银车库-产品展示</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<link href="include/css.css" rel="stylesheet" type="text/css">


</head>
<body bgcolor="#000000" background="images/bg.jpg" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">            
<%
            set rs=server.CreateObject("adodb.recordset")
      rs.open "select news",conn,1,1
      %>

<table width="45%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><table width="75%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td bgcolor="#000000"><table width="75%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td bgcolor="#000000"><table width="100" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
                    <tr>
                      <td><table width="1002" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">
                          <!--#include file="include/header.asp"-->
                          <tr>
                            <td colspan="13" valign="top"><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000">
                                <tr>
                                  <td width="19%" valign="top" background="images/index_10.jpg">
                                    <!--#include file="include/left1.asp"--> </td>
                                  <td valign="top" class="border_no_top">
                                    <table cellspacing=10 cellpadding=0 width="100%" align=center border=0>
      <tbody>
        <tr>
          <td valign=top><table class=border_no_bottom height=30 cellspacing=0 cellpadding=0
      width="100%" border=0>
              <tbody>
                <tr>
                  <td valign=center><table height=20 cellspacing=0 cellpadding=0 width="100%"
              border=0>
                      <tbody>
                        <tr>
                          <td width=25></td>
                          <td class=table_bgcolor width=6></td>
                          <td class=dark13px valign=bottom align=left
                  width=83>&nbsp;当前位置:</td>
                            <td class=dark13px valign=bottom align=left
                  width=666><a href="index.asp"><b><%=webname%></b></a><b><%=lstcat %></b></td>
                          </tr>
                      </tbody>
                  </table></td>
                </tr>
                <tr>
                  <td valign=bottom><table cellspacing=0 cellpadding=0 width="100%" border=0>
                      <tbody>
                        <tr>
                          <td class=table_bgcolor
        height=3></td>
                        </tr>
                      </tbody>
                  </table></td>
                </tr>
              </tbody>
            </table>
              <table class=border_no_top cellspacing=4 cellpadding=0 width="100%"
      border=0>
                <tbody>
                  <tr>
                    <td><table width="760" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">
                        <tr>
                         <td><TABLE WIDTH="760" BORDER="0" ALIGN="center" bgcolor="#FFFFFF" CELLPADDING="0" CELLSPACING="0">
                           <tr>
                             <td width="580" valign="top" align="center"><table border="0" cellpadding="0" cellspacing="0" width="760">
                                 <tr>
                                   <td width="780" valign="top" align="center">

                                   <%
                Const MaxPerPage=9
                   dim totalPut   
                   dim CurrentPage
                   dim TotalPages
                   dim j
                   dim sql
                    if Not isempty(SafeRequest("page",1)) then
                      currentPage=Cint(SafeRequest("page",1))
                   else
                      currentPage=1
                   end if
         set rs=server.CreateObject("adodb.recordset")
           rs.open "select prename,company,mark,intro,name,id,introduce,price1,price2,discount,pic,stock from product where categoryid in ("& CatList&") and stock >= 0 order by adddate desc",conn,1,1
                    
                  if rs.eof And rs.bof then
                       Response.Write "<p align='center' class='contents'> 该页面正在建设中!</p>"
                   else
                      totalPut=rs.recordcount

                      if currentpage<1 then
                          currentpage=1
                      end if

                      if (currentpage-1)*MaxPerPage>totalput then
                           if (totalPut mod MaxPerPage)=0 then
                             currentpage= totalPut \ MaxPerPage
                           else
                              currentpage= totalPut \ MaxPerPage + 1
                           end if
                      end if

                       if currentPage=1 then
                        showContent
                        showpage totalput,MaxPerPage,"cat.asp"
                       else
                          if (currentPage-1)*MaxPerPage<totalPut then
                            rs.move  (currentPage-1)*MaxPerPage
                            dim bookmark
                            bookmark=rs.bookmark
                            showContent
                             showpage totalput,MaxPerPage,"cat.asp"
                        else
                            currentPage=1
                               showContent
                               showpage totalput,MaxPerPage,"cat.asp"
                          end if
                       end if
                                      end if

                   sub showContent
                   dim i
                   i=0

            %>
                                       <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                                         <%
            do while not rs.eof%>
                                         <tr>
                                           <td width="22%" valign="middle" align="center"><TABLE WIDTH="180" HEIGHT="120" BORDER="0" CELLPADDING="0" CELLSPACING="0">
                                                                              <TR>
                                                                                <TD height="120" width="120" colspan="2" align="center" background="images/136.jpg"><a href=product.asp?id=<% = rs("id") %> target="_blank">
                                                                                  <% if trim(rs("pic"))<>"" then %>
                                                                                  <img src=<% = trim(rs("pic"))%>   border=0 width="<% = webimg9 %>" height="<% = webimg10 %>"></a>
                                                                                  <%  else %>
                                                                                  <img src=images/emptybook.jpg  border=0 width="<% = webimg9 %>" height="<% = webimg10 %>"></a>
                                                                                  <% end if %>
                                                                                </TD>
                                               </TR>
                                           </TABLE>
                                                                            <table width="98%" border="0" cellspacing="0" cellpadding="0">
                                                                              <tr>
                                                                                <td><div align="center"><A HREF=product.asp?id=<%=rs("id")%>><font color="#FF6600"><%=trim(rs("name"))%></font></A></div></td>
                                                                              </tr>
                                                                            </table></td>
                                                                          <td width="78%">&nbsp;</td>
                                         </tr>
                                        

                                         <%
            i=i+1
            if i>=MaxPerPage then Exit Do
            rs.movenext
            loop
            rs.close
            set rs=nothing
            %>
                                       </table>

                                     <%  
                End Sub   
  
                Function showpage(totalnumber,maxperpage,filename)  
                  Dim n
                  
                If totalnumber Mod maxperpage=0 Then  
                    n= totalnumber \ maxperpage  
                Else
                    n= totalnumber \ maxperpage+1  
                End If %>
                                       <form method=Post action=<% = filename %>?catid=<% = catid %>>
                                         <%
                If CurrentPage<2 Then  %>
                                         <div align="center">
                                         首页 上页
                                         <% Else  %>
                                         <div align="center">
                                         <a href=<% = filename %>?page=1&catid=<% = catid %>>首页</a> <a href=<% = filename %>?page=<% = CurrentPage-1 %>&catid=<% = catid %>>上页</a>
                                         <%
                End If
                If n-currentpage<1 Then  %>
                                         下页 尾页
                                         <%    Else  %>
                                         <a href=<% = filename %>?page=<% = (CurrentPage+1) %>&catid=<% = catid %>>下页</a> <a href=<% = filename %>?page=<% = n %>&catid=<% = catid %>>尾页</a>
                                         <%    End If  %>
                                         第 <b>
                                           <% = CurrentPage %>
                                           </b>页 共 <b>
                                             <% = n %>
                                             </b>页 共 <b>
                                               <% = totalnumber %>
                                               </b>件产品 每页 <b>
                                                 <% = maxperpage %>
                                                 </b> 件产品 转到第:
                                         <input type='text' name='page' size=2 maxlength=10 value=<% = currentpage %>>
                                         
                                         <input type='submit'  class='contents' value='跳转' name='cndok'>
                                       </form>
                                     <%
                End Function  
            %>
                                   </td>
                                 </tr>
                             </table></td>
                           </tr>
                         </table></td>
                        </tr>
                      </table>
                    </td>
                  </tr>
                  <tr></tr>
                </tbody>
            </table></td>
        </tr>
      </tbody>
    </table>
                                    </td>
                                </tr>
                              </table></td>
                            <td> <img src="images/spacer.gif" width="1" height="352" alt=""></td>
                          </tr>
                        
                          <tr>
                            <td height="2"> <img src="images/spacer.gif" width="37" height="1" alt=""></td>
                            <td> <img src="images/spacer.gif" width="1" height="1" alt=""></td>
                            <td> <img src="images/spacer.gif" width="154" height="1" alt=""></td>
                            <td> <img src="images/spacer.gif" width="46" height="1" alt=""></td>
                            <td> <img src="images/spacer.gif" width="21" height="1" alt=""></td>
                            <td> <img src="images/spacer.gif" width="199" height="1" alt=""></td>
                            <td> <img src="images/spacer.gif" width="23" height="1" alt=""></td>
                            <td> <img src="images/spacer.gif" width="200" height="1" alt=""></td>
                            <td> <img src="images/spacer.gif" width="13" height="1" alt=""></td>
                            <td> <img src="images/spacer.gif" width="8" height="1" alt=""></td>
                            <td> <img src="images/spacer.gif" width="36" height="1" alt=""></td>
                            <td> <img src="images/spacer.gif" width="194" height="1" alt=""></td>
                            <td> <img src="images/spacer.gif" width="70" height="1" alt=""></td>
                            <td></td>
                          </tr>
                        </table></td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td valign="top" background="images/foot.jpg">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr bgcolor="#FFFFFF">
          <td colspan="2" bgcolor=#ededed><img height=1 src="images/spacer.gif"
      width=1></td>
        </tr>
        
        <tr>
          <td colspan="2"><div align="center">
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <!--#include file="include/foot.asp"-->
              </table>
              <p> </p> </div></td>
        </tr>
      </table></td>
  </tr>
</table>
</body>
</html>
搜索更多相关主题的帖子: 竖排 指教 
2008-11-27 11:40
zzz5
Rank: 1
等 级:新手上路
帖 子:7
专家分:0
注 册:2008-11-27
收藏
得分:0 
跪求高手啊。。。。谢谢了
2008-11-27 11:41
sunfishy
Rank: 3Rank: 3
等 级:论坛游侠
威 望:5
帖 子:311
专家分:163
注 册:2007-6-29
收藏
得分:0 
<%
dim i=0
do while not rs.eof
resposen.write "<tr><td>"
....
response.write "</td>"
if i mod 4 =0 then   '一行四张图
response.write "</tr">
end if
i=i+1
loop
%>
</tr>

.cn
2008-11-27 14:21
craft001wen
Rank: 2
等 级:论坛游民
帖 子:242
专家分:62
注 册:2006-5-4
收藏
得分:0 
循环表格或者TR
改为:  
<%do while not rs.eof%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                                       
                                         <tr>
                                           <td width="22%" valign="middle" align="center"><TABLE WIDTH="180" HEIGHT="120" BORDER="0" CELLPADDING="0" CELLSPACING="0">
                                                                              <TR>
                                                                                <TD height="120" width="120" colspan="2" align="center" background="images/136.jpg"><a href=product.asp?id=<% = rs("id") %> target="_blank">
                                                                                  <% if trim(rs("pic"))<>"" then %>
                                                                                  <img src=<% = trim(rs("pic"))%>   border=0 width="<% = webimg9 %>" height="<% = webimg10 %>"></a>
                                                                                  <%  else %>
                                                                                  <img src=images/emptybook.jpg  border=0 width="<% = webimg9 %>" height="<% = webimg10 %>"></a>
                                                                                  <% end if %>
                                                                                </TD>
                                               </TR>
                                           </TABLE>
                                                                            <table width="98%" border="0" cellspacing="0" cellpadding="0">
                                                                              <tr>
                                                                                <td><div align="center"><A HREF=product.asp?id=<%=rs("id")%>><font color="#FF6600"><%=trim(rs("name"))%></font></A></div></td>
                                                                              </tr>
                                                                            </table></td>
                                                                          <td width="78%"> </td>
                                         </tr>
                                         </table>

                                         <%
            i=i+1
            if i>=MaxPerPage then Exit Do
            rs.movenext
            loop
            rs.close
            set rs=nothing
            %>

2008-11-27 16:49
zzz5
Rank: 1
等 级:新手上路
帖 子:7
专家分:0
注 册:2008-11-27
收藏
得分:0 
楼上的大哥 能不能在详细点呢?。。。。。我哭。。。
2008-12-05 12:45
zzz5
Rank: 1
等 级:新手上路
帖 子:7
专家分:0
注 册:2008-11-27
收藏
得分:0 
大哥们 我是菜鸟  你们回答的越详细越好啊 谢谢了
2008-12-05 14:15
hmhz
Rank: 7Rank: 7Rank: 7
等 级:贵宾
威 望:30
帖 子:1890
专家分:503
注 册:2006-12-17
收藏
得分:0 
几行几列排列需要集合布局格式来实现的

你可以使用3楼的代码去套用你的页面,布局根据你自己的布局情况去修改,这是逻辑思维问题,只有你自己去动手慢慢测试才能真正领悟这个逻辑

[编程论坛] ASP超级群:49158383  敲门暗号:ASP编程
龍艺博客 http://www.
2008-12-06 14:08
zzz5
Rank: 1
等 级:新手上路
帖 子:7
专家分:0
注 册:2008-11-27
收藏
得分:0 
谢谢 我去搞搞看  争取早日成为高手
2008-12-08 11:52
快速回复:怎么把这个变成横排的图片,原来的是竖排的
数据加载中...
 
   



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

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