| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 387 人关注过本帖
标题:大哥们帮帮忙—ASP分行问题
只看楼主 加入收藏
nyzhaoxin
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2008-4-23
收藏
 问题点数:0 回复次数:0 
大哥们帮帮忙—ASP分行问题
高手们看看,在哪加代码能让一行显示五个

<style type="text/css">
<!--
.style5 {
    font-size: 18px;
    color: #FFFFFF;
}
.style6 {
    font-size: 14px;
    color: #FFFFFF;
}
.unnamed1 {
    font-size: 24px;
    color: #FF0000;
}
.unnamed2 {
    font-size: 20px;
    color: #000000;
}
a:link {
    color: #000000;
}
a:visited {
    color: #000000;
}
-->
</style>
<!--#include file="conn.asp"-->
<table width="790" height="30" border="0" align="center" cellpadding="0" cellspacing="0" background="image/mall_2.gif">
  <tr>
    <td width="50"><img src="image/mall_1.gif" width="30" height="30"></td>
    <td class="style5">NEW A&amp;F CLOTHES</td>
    <td width="250"><form><table width="100%" HIGHT=30 border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="30"><input name="textfield" type="text" size="18">
          <input type="submit" name="Submit" value="seach"> </td>
      </tr>
    </table></form></td>
  </tr>
</table>
<table width="790" height="10"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td bgcolor="#CCCCCC">&nbsp;</td>
  </tr>
</table>
<table width="790"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#999999">
  <tr>
    <td width="790" align="left" bgcolor="#FFFFFF">
    


    
    <table width="158" border="0" cellpadding="0" cellspacing="0">
      <tr>
  <%
  
page=clng(request("page"))
Set rs=Server.CreateObject("ADODB.RecordSet")
sql="select * from shop"
rs.Open sql,conn,1,3
if rs.eof and rs.bof then
response.Write("没有记录")
else
rs.PageSize=3
if page=0 then page=1
pages=rs.pagecount
if page > pages then page=pages
rs.AbsolutePage=page  
   
for j=1 to rs.PageSize

%>



        <td><table width="158" border="0" cellpadding="5" cellspacing="0">
          <tr>
            <td width="158" height="120" align="center" valign="middle"><table width="130" height="130" border="0">
                <tr>
                  <td align="center"><a href="xian.asp?shop_id=<%=rs("shop_id")%>"><img border="0" src="UploadFiles/<%=trim(rs("pic"))%>"  width="100" height="120"   style="BORDER-RIGHT: #333333 1px dashed; BORDER-TOP: #333333 1px dashed; BORDER-LEFT: #333333 1px dashed; BORDER-BOTTOM: #333333 1px dashed"/></a></td>
                </tr>
            </table></td>
          </tr>
          <tr>
            <td align="center" valign="middle"><%=rs("shop_title")%></td>
          </tr>
          <tr>
            <td align="center" valign="middle"><span class="unnamed1">price:</span><span class=""unnamed2"><span class="unnamed2"><%=rs("shop_price")%></span></span></td>
          </tr>
          <tr>
            <td width="158" height="21" align="center" valign="middle"><a href="xian.asp?shop_id=<%=rs("shop_id")%>"><img src="image/BUY.gif" width="62" height="21" border="0"></a></td>
          </tr>
          


        </table></td>
        <%
        rs.movenext
if rs.eof then exit for

next                                                      
%>
      </tr>
    </table>



</td> </tr>
</table>
<table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center">&nbsp;</td>
  </tr>
  <tr>
  <form method=Post action="index.asp">  
    <td align="center"><%if Page<2 then      
    response.write "首页 上一页&nbsp;"
  else
    response.write "<a href=index.asp?page=1>首页</a>&nbsp;"
    response.write "<a href=index.asp?page=" & Page-1 & ">上一页</a>&nbsp;"
  end if
  if rs.pagecount-page<1 then
    response.write "下一页 尾页"
  else
    response.write "<a href=index.asp?page=" & (page+1) & ">"
    response.write "下一页</a> <a href=index.asp?page="&rs.pagecount&">尾页</a>"
  end if
   response.write "&nbsp;页次:<strong><font color=red>"&Page&"</font>/"&rs.pagecount&"</strong>页 "
    response.write "&nbsp;共<b><font color='#FF0000'>"&rs.recordcount&"</font></b>条记录 <b>"&rs.pagesize&"</b>条记录/页"
   response.write " 转到:<input type='text' name='page' size=4 maxlength=10 class=input value="&page&">"
   response.write " <input class=input type='submit'  value=' Goto '  name='cndok'></span></p>"     
%></td></form>
  </tr>
</table>
<%
end if
rs.close
set rs=nothing
%>
搜索更多相关主题的帖子: ASP 分行 
2008-04-23 16:28
快速回复:大哥们帮帮忙—ASP分行问题
数据加载中...
 
   



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

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