| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 542 人关注过本帖
标题:大家帮忙
只看楼主 加入收藏
bikaqi
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2008-10-10
收藏
 问题点数:0 回复次数:4 
大家帮忙
<table width="225" border="0" cellpadding="3" cellspacing="0" bgcolor="#F0F9FF">
                    <%
Set Rs=Server.Createobject("Adodb.Recordset")
Sql="Select * From pic order by id desc"
Rs.open Sql,Conn,1,1
%>
                    <%
For i=1 To 96
   If rs.eof Then Exit For
   If i mod 2 <> 0 Then
%>
                    <tr>
                      <td width="50%" height="25"> <a href="pic/<%=rs("id")%>.htm" target=_blank><%=left(rs("picname"),8)%></a></td>
                      <%Else%>
                      <td width="50%"> <a href="pic/<%=rs("id")%>.htm" target=_blank><%=left(rs("picname"),8)%></a></td>
                    </tr>
                    <%
End If
rs.movenext
Next
rs.close
set rs=NOTHING
%>
</table>

原来的是两列。我想把这个改变6列。大家帮忙。
搜索更多相关主题的帖子: blank border target 
2008-10-10 15:55
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
收藏
得分:0 
If i mod 2 <> 0 Then
换成If i mod 6 <> 0 Then
2008-10-10 16:12
bikaqi
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2008-10-10
收藏
得分:0 
我已经改了可还是不行
好像<%Else%> 出了什么问题
2008-10-10 16:20
孤独冷雨
Rank: 10Rank: 10Rank: 10
来 自:安徽滁州
等 级:贵宾
威 望:23
帖 子:1247
专家分:1909
注 册:2007-6-4
收藏
得分:0 
<table width="99%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                <!--循环开始-->    
                 <%
dim j
j=1
set conn2=server.createobject("ADODB.Connection")
conn2.open"driver={Microsoft Access Driver (*.mdb)};DBQ="&server.mappath("news/db/sxzx-net.asp")
set rs=server.CreateObject("adodb.recordset")
sql="Select * from newscata where level=2 and left(rootid,3)=319  order by id "
rs.Open sql,conn2,1,1

do while not rs.EOF
 
%>
    
        
         <tD align="center" valign="middle">
           <table width="98%" border="0" cellspacing="0" cellpadding="0">
            <TR>
            
               <td height="20" class="font13"><table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
                      <tr>
                        <td width="308" height="20" background="img/left16.gif"><table width="98%" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td width="39">&nbsp;</td>
                            <td width="239" class="font13"><%=rs("title")%></td>
                          </tr>
                        </table></td>
                        <td width="444" height="20" align="right" valign="middle" background="img/left11.gif"><a  href="flyzk_a.asp?cataid=<%=rs("id")%>&cataname=<%=rs("title")%>" class="red">更多&gt;&gt;</a> </a>&nbsp; </td>
                      </tr>
                    </table></td>
               
               </TR>
            <TR>
              <Td height="143" colspan="2" valign="top">
               <div align="left">
                                    <table width="97%" border="0" align="center" cellpadding="0" cellspacing="0" class="line">
                                      <tr>
                                        <td height="14" valign="bottom" bgcolor="#FFFFFF"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
                                            <tr>
                                              <td height="165" valign="top"><div align="left">
                                                
                                    <script language="JavaScript" src="news/snews.asp?cataid=<%=rs("id")%>&words=20&num=7&l_d=ok" type="text/javascript"></script>
                                              </div></td>
                                            </tr>
                                        </table></td>
                                      </tr>
                                    </table>
                                    <br><br>
               </div>              </Td>
            </TR>
           </table>
         </tD>
          <%
           if (j mod 2)=0 then
             j=0
            %>
              </tr><tr>
            <%
           end if
          %>
                             <%
     j=j+1                    
rs.movenext
loop
rs.close

%>
        </tr>
        </table>
<!--结束-->

给你一个参考!

[[it] 本帖最后由 孤独冷雨 于 2008-10-10 17:08 编辑 [/it]]
2008-10-10 17:07
bikaqi
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2008-10-10
收藏
得分:0 
还是看不行。
2008-10-10 17:49
快速回复:大家帮忙
数据加载中...
 
   



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

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