| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 560 人关注过本帖
标题:ASP横向排列问题,高手请进~~~!
只看楼主 加入收藏
sjhqqq
Rank: 1
等 级:新手上路
帖 子:15
专家分:0
注 册:2011-10-12
结帖率:50%
收藏
已结贴  问题点数:20 回复次数:1 
ASP横向排列问题,高手请进~~~!
程序代码:
<%
set rs_cp=server.CreateObject("adodb.recordset")
sql="select * from products order by cp_sj desc"
rs_cp.open sql,conn,1,1
%>         
            <table width="100%" height="23" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td height="23"></td>
              </tr>
            </table>
            <table width="760" height="769" border="0" cellpadding="0" cellspacing="0" class="class">
              <tr>
                <td height="767" align="center" valign="top">
                <table width="200" height="324" border="0" cellpadding="0" cellspacing="0" class="tb_4_bian">
<%if not(rs_cp.bof or rs_cp.eof) then
rs_cp.pagesize=6  '每页显示记录条数
if request("page")<>"" then

 epage=cint(request("page"))

 if epage<1 then epage=1

 if epage>rs_cp.pagecount then epage=rs_cp.pagecount

 else

 epage=1

 end if

 rs_cp.absolutepage=epage

 for i=0 to rs_cp.pagesize-1
if rs_cp.bof or rs_cp.eof then exit for
%>               
                  <tr>
                    <td width="200" height="200" align="center" valign="middle"><img src="upload/<%=rs_cp("cp_image")%>" alt="<%=rs_cp("cp_jianjie")%>" width="200" height="200" border="0" style="cursor:pointer;BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 8px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 8px; PADDING-BOTTOM: 8px; BORDER-LEFT: #cccccc 1px solid; PADDING-TOP: 8px; BORDER-BOTTOM: #cccccc 1px solid;" /></td>
                  </tr>
                  <tr>
                    <td width="200" height="20" align="center"></td>
                  </tr>
                  <tr>
                    <td width="200" height="34" class="xu_xian_botton">产品名称:<%=rs_cp("cp_mc")%></td>
                  </tr>
                  <tr>
                    <td height="35" class="xu_xian_botton">产品价格:<%=formatnumber(rs_cp("cp_dj"),-1,-1)%>元/<%=rs_cp("cp_dw")%></td>
                  </tr>
                  <tr class="pt_10_white">
                    <td width="200" height="35"><%call GetStringLength(rs_cp("cp_jianjie"),12)%></td>
                  </tr>
<%

 rs_cp.movenext
next
%>
                </table>
                <table width="100%" height="12" border="0" cellpadding="0" cellspacing="0" class="pt10">
                  <tr>
                    <td></td>
                  </tr>
                </table>
                <table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="pt10_hui">
                  <tr align="center" valign="bottom">
                    <td height="22"><font color="FFFFFF"><%=epage%></font>页/共<font color="FFFFFF"><%=rs_cp.pagecount%></font>&nbsp;<font color="FFFFFF"><%=rs_cp.recordcount%></font>条记录&nbsp;
                        <%if epage<>1 then%>
                        <a class="hui" href="?page=0">第一页</a>&nbsp;
                        <%else%>
                      第一页&nbsp;
                      <%end if%>
                      <%if epage<>1 then%>
                      <a class="hui" href="?page=<%=epage-1%>">上一页</a>&nbsp;
                      <%else%>
                      上一页&nbsp;
                      <%end if%>
                      <%if epage<>rs_cp.pagecount then%>
                      <a class="hui" href="?page=<%=epage+1%>">下一页</a>&nbsp;
                      <%else%>
                      下一页&nbsp;
                      <%end if%>
                      <%if epage<>rs_cp.pagecount then%>
                      <a class="hui" href="?page=<%=rs_cp.recordcount%>">最后页</a>
                      <%else%>
                      最后页&nbsp;
                      <%end if%>
                      &nbsp;
                      跳转到第
                      <input type="text" name="go" id="go" style="width:20px;height:20px;text-align:center;vertical:middle"><input  type="button" name="skip" value="Go" onClick="window.location.href='?page='+document.getElementById('go').value">
                      </form>
                      <%end if%>
                    </td>
                  </tr>
                </table>
                <table width="100%" height="12" border="0" cellpadding="0" cellspacing="0" class="pt10">
                  <tr>
                    <td></td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>
如何修改代码让横纵显示成 3x2排列?
搜索更多相关主题的帖子: sql 
2011-11-16 22:00
yessanya
Rank: 2
等 级:论坛游民
帖 子:69
专家分:20
注 册:2007-6-23
收藏
得分:20 
仅供参考,共同学习
<%
for m=1 to 3
%>
<tr>
<%
i=1
do while (Not RS.Eof) and (i<=3)
%>
<td>内容</td>
<%
i=i+1
RS.MoveNext
Loop
%>
</tr>
<%
next
%>
2011-11-16 23:34
快速回复:ASP横向排列问题,高手请进~~~!
数据加载中...
 
   



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

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