图片如何横向显示5张(急!!!)
这是竖着排列图片的,如何改动变成横向显示图片呀,谢谢!<tablewidth="97"height="180"border="0"align="center"cellpa...
这是竖着排列图片的,如何改动变成横向显示图片呀,谢谢!
<table width="97" height="180" border="0" align="center" cellpadding="0" cellspacing="0">
<%
Set rs3= Server.CreateObject("ADODB.Recordset")
sql="select top 5 * from dcrw order by ID Desc"
rs3.open sql,conn,1,3
do while not rs3.eof
%>
<tr>
<td width="97" height="136"><%if rs3("images")<>"" then%>
<img src="<%=rs3("images")%>" width="80" height="100" alt="">
<%end if%></td>
</tr>
<tr>
<td height="44"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="18" colspan="2"><font color="#848484">名称</font><font color="#848484">:<%=rs3("username")%></font></td>
</tr>
<tr>
<td height="1" colspan="2" background="images/list_04.gif"></TD>
</tr>
<tr>
<td height="1" colspan="2" background="images/list_04.gif"></TD>
</tr>
<tr>
<td height="1" colspan="2" background="images/list_04.gif"></TD>
</tr>
<tr>
<td height="22"><div align="left"><a href="ysdetail.asp?ID=<%=rs3("ID")%>"><font color="#9C044C">详细介绍</font></a></div></td>
<td><div align="right"><a href="expert.asp"><img src="images/zjmore.gif" width="41" height="17" border="0"></a></div></td>
</tr>
<tr>
<td height="1" colspan="2" background="images/list_04.gif"></TD>
</tr>
</table></td>
</tr>
<%
rs3.movenext
loop
%>
</table> 展开
<table width="97" height="180" border="0" align="center" cellpadding="0" cellspacing="0">
<%
Set rs3= Server.CreateObject("ADODB.Recordset")
sql="select top 5 * from dcrw order by ID Desc"
rs3.open sql,conn,1,3
do while not rs3.eof
%>
<tr>
<td width="97" height="136"><%if rs3("images")<>"" then%>
<img src="<%=rs3("images")%>" width="80" height="100" alt="">
<%end if%></td>
</tr>
<tr>
<td height="44"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="18" colspan="2"><font color="#848484">名称</font><font color="#848484">:<%=rs3("username")%></font></td>
</tr>
<tr>
<td height="1" colspan="2" background="images/list_04.gif"></TD>
</tr>
<tr>
<td height="1" colspan="2" background="images/list_04.gif"></TD>
</tr>
<tr>
<td height="1" colspan="2" background="images/list_04.gif"></TD>
</tr>
<tr>
<td height="22"><div align="left"><a href="ysdetail.asp?ID=<%=rs3("ID")%>"><font color="#9C044C">详细介绍</font></a></div></td>
<td><div align="right"><a href="expert.asp"><img src="images/zjmore.gif" width="41" height="17" border="0"></a></div></td>
</tr>
<tr>
<td height="1" colspan="2" background="images/list_04.gif"></TD>
</tr>
</table></td>
</tr>
<%
rs3.movenext
loop
%>
</table> 展开
2个回答
展开全部
<%
怎样输出每行
5
个
假设你前面已经打开了一个
rs
response.write
"<table>"
dim
i,
j
i
=
1
do
while
not
rs.eof
j
=
i
mod
5
if
j
=
1
then
response.write
"<tr>"
response.write
"<td><img
src="
&
rs("图片地址")
&
"></td>"
if
j
=
0
then
response.write
"</tr>"
i
=
i
+
1
rs.movenext
loop
if
(i
mod
5)
<>
1
then
for
j
=
0
to
((6
-
i)
mod
5)
response.write
"<td> </td>"
next
end
if
试试
怎样输出每行
5
个
假设你前面已经打开了一个
rs
response.write
"<table>"
dim
i,
j
i
=
1
do
while
not
rs.eof
j
=
i
mod
5
if
j
=
1
then
response.write
"<tr>"
response.write
"<td><img
src="
&
rs("图片地址")
&
"></td>"
if
j
=
0
then
response.write
"</tr>"
i
=
i
+
1
rs.movenext
loop
if
(i
mod
5)
<>
1
then
for
j
=
0
to
((6
-
i)
mod
5)
response.write
"<td> </td>"
next
end
if
试试
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
<%
怎样输出每行 5 个
假设你前面已经打开了一个 rs
response.write "<table>"
dim i, j
i = 1
do while not rs.eof
j = i mod 5
if j = 1 then response.write "<tr>"
response.write "<td><img src=" & rs("图片地址") & "></td>"
if j = 0 then response.write "</tr>"
i = i + 1
rs.movenext
loop
if (i mod 5) <> 1 then
for j = 0 to ((6 - i) mod 5)
response.write "<td> </td>"
next
end if
试试
怎样输出每行 5 个
假设你前面已经打开了一个 rs
response.write "<table>"
dim i, j
i = 1
do while not rs.eof
j = i mod 5
if j = 1 then response.write "<tr>"
response.write "<td><img src=" & rs("图片地址") & "></td>"
if j = 0 then response.write "</tr>"
i = i + 1
rs.movenext
loop
if (i mod 5) <> 1 then
for j = 0 to ((6 - i) mod 5)
response.write "<td> </td>"
next
end if
试试
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询