注册 登录
编程论坛 ASP技术论坛

求各位路过的大师进来指点一下,急

姑娘min 发布于 2013-06-17 11:46, 565 次点击
程序代码:
<table width="230" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td style="font:bold; line-height:160%">
                 <%
               
set rs1=server.createobject("adodb.recordset")
        rs1.open
"select top 5  * from shop_news_hm where newsid order by adddate desc",conn,1,1
        
if rs1.recordcount=0 then
        
%>
      
                  <table width="90%" border="0" cellspacing="0" cellpadding="5" align="center">
                    <tr>
                      <td height="26" align=center>暂无分类,请在后台添加!</td>
                    </tr>
                  </table>
                  <%else%>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  </table>
                  <table width="230"  border="0" align="center" cellpadding="0" cellspacing="0">
                      <ul style="float:left" height="25"  >
                      <%
            
while not rs1.eof
                     
            
%>
                      <li   style="float:left"><a href="zzfa<%=rs1("newsid")%>.html">
                      <%if len(trim(rs1("newsname")))>8 then
    response.write
left(trim(rs1("newsname")),8)&"..."
   
else
    response.write
trim(rs1("newsname"))
   
end if%>
                       
                      </a>
                      </li>
                       <li > <a href="zzfa<%=rs1("newsid")%>.html">
                      <%if len(trim(rs1("newsname")))>8 then
    response.write
left(trim(rs1("newsname")),8)&"..."
   
else
    response.write
trim(rs1("newsname"))
   
end if%>
                       
                      </a>
                      </li>
                      <%
            rs1.movenext
            
wend
            
%>
                    </ul>
                  
                </table>
                <%
        
end if
        rs1.close
        
set rs1=nothing
        
%></td>
                </tr>
            </table>
我想把一个newsid分为4行两列,一共只出现八个newsname,要怎么弄呀?
0 回复
1