| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 533 人关注过本帖
标题:请教分行分列
取消只看楼主 加入收藏
zwz7075
Rank: 1
等 级:新手上路
帖 子:76
专家分:0
注 册:2005-12-30
收藏
 问题点数:0 回复次数:0 
请教分行分列
各位好:

怎么把从后台添加的图片从一行显示为四行?代码如下:


<%
Const New_img=16      
set rs_Product=server.createobject("adodb.recordset")
sqltext="select top " & New_img & " * from Product where Passed=True order by UpdateTime desc"
rs_Product.open sqltext,conn,1,1
if not rs_Product.EOF then%>
<table align='center' cellpadding='0' cellspace='0' border='0'>
<tr>
    <td id='demo1' valign='top'>
        <table width='100%' cellpadding='0' cellspacing='0' border='0' align='center'>
        <tr valign='top'>
    <%
    while not rs_Product.EOF
    fileExt=lcase(getFileExtName(rs_Product("DefaultPicUrl")))        
    %>
            <td align='center'>
                <TABLE width=100% border=0 align=center cellPadding=0 cellSpacing=0>
                <TR>
                    <TD></TD>
                  </TR>
                <TR>
                  <TD style="padding-left:5px; padding-right:5px; padding-top:15px; " align="center">
                      <a href='ProductShow.asp?ArticleID=<%=rs_Product("ArticleID")%>' target=_blank title='<%=rs_Product("title")%>'>
        <%if fileext="jpg" or fileext="bmp" or fileext="png" or fileext="gif" then%>
</a>
                      <table border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td><img src="img/chanpin_left.gif" width="8" height="125"></td>
                          <td><table border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td><img src="img/chanpin_img01.gif" width="104" height="8"></td>
                            </tr>
                            <tr>
                              <td><a href='ProductShow.asp?ArticleID=<%=rs_Product("ArticleID")%>' target=_blank title='<%=rs_Product("title")%>'><img border="0" height="104" src="<%if rs_Product("DefaultPicUrl")="" then%>Img/nopic.gif<%else%><%=rs_Product("DefaultPicUrl")%><%end if%>" width="104" alt="<%=rs_Product("title")%>"></a></td>
                            </tr>
                            <tr>
                              <td><img src="img/chanpin_img02.gif" width="104" height="13"></td>
                            </tr>
                          </table></td>
                          <td><img src="img/chanpin_right.gif" width="14" height="125"></td>
                        </tr>
                      </table>
                      <a href='ProductShow.asp?ArticleID=<%=rs_Product("ArticleID")%>' target=_blank title='<%=rs_Product("title")%>'>        
<%else
            if fileext="swf" then%>
</a><a href='ProductShow.asp?ArticleID=<%=rs_Product("ArticleID")%>' target=_blank title='<%=rs_Product("title")%>'>

</a>
<%end if
        end if%>
                        
                  </TD>
                  </TR>
              <TR>
                  <TD align=center height=30><a href='ProductShow.asp?ArticleID=<%=rs_Product("ArticleID")%>' target=_blank title='<%=rs_Product("title")%>' class="top_m_txt01"><%=cutstr(rs_Product("title"),10)%> </a></TD>
                   </TR>
                 </TABLE>
            </td>
      <%
      rs_Product.MoveNext
    wend
    %>
        </tr>
        </table>
    </td>
    </tr>
</table>
<%if New_img >16 then%>

    <%end if
else
    Response.Write "暂 无 最 新 图 文"
end if
rs_Product.close
set rs_Product=nothing
%>
搜索更多相关主题的帖子: 分行 分列 
2008-04-24 11:23
快速回复:请教分行分列
数据加载中...
 
   



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

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