求高手帮看一下,怎样才能把图片 分成1行5列
dim Topimg
Set Rs=Conn.Execute( "Select top 8 * from info where Indexpic= '1 ' and tid in( "&sid& ") order by inputdate desc,id desc ")
if rs.eof then
Topimg= "·暂无图片 "
else
h=0
do while not rs.eof
h=h+1
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
Topimg=Topimg& " <table width= " "135 " " height= " "110 " " border= " "0 " " cellpadding= " "0 " " cellspacing= " "0 " "> "&chr(13)
Topimg=Topimg& " <tr> "&chr(13)
Topimg=Topimg& " <td align= " "center " "> <div align= " "center " "> "&chr(13)
Topimg=Topimg& " <a href= " " "&Replace(rs( "Html "),Ename, " ")& " " "> "&chr(13)
Topimg=Topimg& " <img src= "&(rs( "Spic "))& " width= "& " " "135 " " "& " height= "& " " "110 " " "& "> "&chr(13)
Topimg=Topimg& " </a> "&chr(13)
Topimg=Topimg& " </div> "&chr(13)
Topimg=Topimg& " <tr> <td> <div align= " "center " "> <a href= " " "&Replace(rs( "Html "),Ename, " ")& " " "> "&Leftstr(rs( "title "),20)& " </a> </div> </td> </tr> "&chr(13)
Topimg=Topimg& " </tr> "&chr(13)
Topimg=Topimg& " </table> "&chr(13)
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
if h> =8 then exit do
rs.movenext
loop
h=0
end if
rs.close
[解决办法]
<table>
<tbody>
<%
Strsql= "select id,classcn,classen,Picurl,title from news where classen= ' "&Strtxt& " ' order by id desc "
rs.open Strsql,conn,1,1
if not rs.eof then
.....
i=0
end if
do while not rs.eof and i <rs.pagesize
%>
<tr>
<%for j=1 to 3%>
<td width= "33% " align= "center " height= "50 ">
<table width= "134 " border= "0 " cellpadding= "0 " cellspacing= "0 " id= "table14 ">
<tbody>
<%if not rs.eof then%> <tr>
<td>
<img name= "index_r26_c16 " src= "images/index_r26_c16.jpg " width= "199 " height= "20 " border= "0 " id= "index_r26_c16 " alt= " " /> </td>
</tr>
<tr>
<td background= "images/index_r27_c16.jpg ">
<p align= "center ">
<a href= "click.asp?id= <%=rs( "id ")%> &stype=医院环境 " target= "_blank ">
<img height= "110 " src= " <%=rs( "picurl ")%> " width= "161 " align= "middle " border= "0 " /> </a>
</td>
</tr>
<tr>
<td align= "center ">
<img name= "index_r29_c16 " src= "images/index_r29_c16.jpg " width= "199 " height= "19 " border= "0 " id= "index_r29_c16 " alt= " " /> </td>
</tr>
<tr>
<td height= "33 " align= "center " background= "images/cp_r6_c2.gif "> <a href= "click.asp?id= <%=rs( "id ")%> &stype=医院环境 ">
<%=rs( "title ")%> </a> </td>
</tr>
</tbody> <%end if%>
</table> </td>
<%if not rs.eof then%>
<%rs.movenext%>
<%end if%>
<%i=i+1%>
<%next%>
</tr>
<%loop%>
<%
rs.Close
%>
</tbody>
</table>
==========================
<%for j=1 to 3%>
<td width= "33% " align= "center " height= "50 ">
改这里就行