| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 389 人关注过本帖
标题:怎么实现3行3列
只看楼主 加入收藏
许幽
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2012-11-21
结帖率:0
收藏
已结贴  问题点数:20 回复次数:1 
怎么实现3行3列
<!--#include file="head.asp"-->
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
  <td width="210" align="center" valign="top">
  <!--#include file="left.asp"-->
  </td>
    <td align="center" valign="top"><table width="615" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="100%" height="1"><!---->
            <img src="pic/center_03.jpg" width="615" height="40" /></td>
      </tr>
    </table>
      <table width="615" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
        <tr>
          <td height="440" align="center" valign="top">
         <!-- <div style="OVERFLOW: auto; WIDTH: 615px; HEIGHT: 420px">
            <link href="css/css.css" rel="stylesheet" type="text/css" />-->
            <script type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
//-->
          </script>
<%bid=int(request("bid"))%>
            <table width="580"  border="0" align="center" cellpadding="0" cellspacing="0" class="body12">
              <tr>
                <td align="center" valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" background="images/news16.gif">
<%
set rs=server.CreateObject("adodb.recordset")
bid=request("bid")

if bid="" then
rs.open ("select * from product where shenhe=1 order by smallclassid asc,addtime desc"),conn,1,1
else
rs.open ("select * from product where shenhe=1 and bigclassid="& bid &" order by smallclassid asc,addtime desc"),conn,1,1
end if
'//////////////////////////////////////////////////////////////
if rs.eof then
response.Write "<tr><td><TABLE cellSpacing=1 cellPadding=3 width=540 align=center border=0  class=UIP id=tab><TR><TD background=images/nnn2.gif height=23></TD></TR><TR><TD height=100 aling=center class=body12><a href=product.asp>数据库中没有您要找的资料!!</a></TD></TR></table></td></tr></table>"
else
rs.pagesize=9
page=cint(request.querystring("page"))
  if page<2 then
     page=1
  elseif page>rs.pagecount then
     page=rs.pagecount
  end if
  if not rs.eof then rs.absolutepage=page
%>
                    <tr>
                    
                      <%for i=1 to 3
               
 author=rs("author")
 bigclassids=rs("bigclassid")
 smallclassids=rs("smallclassid")
 tupian=rs("tupian")
 id=rs("id")
 %>
                      <!--//////////////////////////////////////////////////////////////////////////-->
                      <%
set rs2=conn.execute("select * from product_bigclass where id="&bigclassids&"")
if rs2.eof then
response.Write "暂时没有记录!"
else
bfl=rs2("bigclassname")
rs2.close
end if
set rs3=conn.execute("select * from product_smallclass where id="&smallclassids&"")
if rs3.eof then
response.Write "暂时没有记录!"
else
sfl=rs3("smallclassname")
rs3.close
end if
%>
                      <!--//////////////////////////////////////////////////////////////////////////-->
                      <td width="1%" height="26">
                     
                     
         
                        
                       <a href="List.asp?id=<%=rs("id")%>&bfl=<%=bigclassids%>&sfl=<%=smallclassids%>">  <div align="center">
                              
                             
                              
                              <%if tupian="" then%>
                             
                                <%else
response.Write "<IMG src=admin/"& tupian &" width=100 height=100 border=0 >"
end if
%>
                          </div>
                            </a>
                            <br />
                            <br />
                            <br />
                        
                     
                     
                    
                    <%rs.movenext
  if rs.eof then
  exit for
  end if
 next%>
                  </table>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
                      <tr>
                        <td align="center" class="body12">&nbsp;共【<font color=#ff0000 ><%= rs.recordcount %></font>】种产品|分【<font color=#ff0000><%= rs.pagecount %></font>】页显示|当前第【<font color=#ff0000><%= page %></font>】页&nbsp; </td>
                        <td align="center" valign="top" class="body12">&nbsp;&nbsp;
                            <% if page>1 then
%>
                            <a href="?page=<%=1%><%if bid<>"" then%>&bid=<%=bid%><%end if%>">首页</a>
                            <% else %>
                          首页
                          <%end if
if page>1 then%>
                          <a href="?page=<%=page-1%><%if bid<>"" then%>&bid=<%=bid%><%end if%>">上一页</a>
                          <% else %>
                          上一页
                          <%end if
if page<rs.pagecount then%>
                          <a href="?page=<%=page+1%><%if bid<>"" then%>&bid=<%=bid%><%end if%>">下一页</a>
                          <%else%>
                          下一页
                          <%end if
if page<rs.pagecount then%>
                          <a href="?page=<%=rs.pagecount%><%if bid<>"" then%>&bid=<%=bid%><%end if%>">尾页</a>
                          <% else %>
                          尾页
                          <% end if %>                        </td>
                        <td align="center" valign="top" class="body12"><select name="menu1" class="INT1" onchange="window.location.href=this.options[this.selectedIndex].value">
                            <option selected="selected">跳转页面到...</option>
                            <% for i=1 to rs.pagecount %>
                            <option  value="?page=<%=i%><%if bid<>"" then%>&bid=<%=bid%><%end if%>">&nbsp;├「第<%= i %>页」</option>
                            <% next %>
                        </select></td>
                      </tr>
                    </table>
                  <%rs.close
end if
%>                </td>
              </tr>
            </table>
          <!--</div>--></td>
        </tr>
    </table></td>
  
    <td width="168" height="451" align="center" valign="top" class="left_bg_index">
      <script language="javascript" type="text/javascript">
LoadFlash("swf/left.swf","transparent",168,450);
</script></td>
  </tr>
</table>

<!--#include file="foot.asp"-->
搜索更多相关主题的帖子: top include border center 
2012-11-21 15:15
dzt0001
Rank: 13Rank: 13Rank: 13Rank: 13
等 级:蒙面侠
威 望:5
帖 子:1281
专家分:4998
注 册:2005-10-12
收藏
得分:20 
在循环事加一个变量i或者n你自己定,表示本页第n条记录,
n++,当n被3整除(n mod 3 = 0)时,结束表格行并加入新行</tr><tr...>

----我怎能在别人的苦难面前转过脸去----
2012-11-21 17:47
快速回复:怎么实现3行3列
数据加载中...
 
   



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

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