标题:这个问题怎么解决啊?高手帮忙!
只看楼主
hinone
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2010-8-9
结帖率:0
已结贴  问题点数:20 回复次数:2 
这个问题怎么解决啊?高手帮忙!
<table width="94%" border="0" align="right" cellpadding="0" cellspacing="0">
                <tr>
                <%
set rs=server.CreateObject("adodb.Recordset")
sql="select  * from kh "
rs.open sql,conn,1,1
if rs.eof then%>
                  
    <tr>
                              <td height="8" align="center"><strong>暂无客户信息!</strong></td>
                            </tr>
                            <%else
do while not rs.eof
%>
                            <tr>
                              <td height="22"><img height="5" src="image/icon_dot01.gif" width="5">
                                <%if len(rs("name")) > 100 then Response.write left(rs("nema"),100)&"..." else Response.write rs("name") end if%>
                              </td>
                            <td>
                            <%     
rs.movenext
loop
rs.close
set rs=nothing
end if%>
</td>                  
</tr>                  
               
              </table>

这是我现在的写法!
现在显示的是
A
A
A
A
A
A
A
A
这样的,我想让他显示成
A A
A A
A A
A A
就是一个TABLE里,现在显示的是一列,我想让他变成,达到20条后,自动变成2列!高手帮忙啊,救命啊!
2010-08-10 19:21
zmh886
Rank: 9Rank: 9Rank: 9
等 级:贵宾
威 望:12
帖 子:238
专家分:1305
注 册:2010-6-2
得分:10 

                            <td>
                            <%     
rs.movenext
改成

                              <td height="22"><img height="5" src="image/icon_dot01.gif" width="5">
                                <%if len(rs("name")) > 100 then Response.write left(rs("nema"),100)&"..." else Response.write rs("name") end if%>
                              </td>
                            <%     
rs.movenext

</td>                  
</tr>   
改为

         
</tr>   

http://www./
2010-08-10 20:46
hams
Rank: 12Rank: 12Rank: 12
等 级:贵宾
威 望:18
帖 子:912
专家分:3670
注 册:2008-7-30
得分:10 
<table width="94%" border="0" align="right" cellpadding="0" cellspacing="0">
                <tr>
                <%
set rs=server.CreateObject("adodb.Recordset")
sql="select  * from kh "
rs.open sql,conn,1,1
if rs.eof then%>
                  
    <tr>
                              <td height="8" align="center"><strong>暂无客户信息!</strong></td>
                            </tr>
                            <%else
do while not rs.eof
%>
                            <tr>
                              <td height="22"><img height="5" src="image/icon_dot01.gif" width="5">
                                <%if len(rs("name")) > 100 then Response.write left(rs("nema"),100)&"..." else Response.write rs("name") end if%>
                              </td>
<%
rs.movenext
if rs.eof then
%>
<td height="22"></td>
<%else%>
<td height="22"><img height="5" src="image/icon_dot01.gif" width="5">
                                <%if len(rs("name")) > 100 then Response.write left(rs("nema"),100)&"..." else Response.write rs("name") end if%>
                              </td>
<%   
rs.movenext
end if
%>
                            <td>
                            <% loop
rs.close
set rs=nothing
end if%>
</td>                  
</tr>                  
               
              </table>

俺不高手,俺也是来学习的。
俺的意见不一定就对,当你不认同时请点忽视按钮。
当走到十字路口不知该如何走时,可在论坛问下路,但你若希望别人能一路把你送到目的地,显然是不现实的,因为别人也有自己要走的路。
2010-08-10 21:46



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-315350-1-1.html




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

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