我想在ASP网站上实现引用数据库中的产品图片左右滚动显示,请问如何实现? 谢谢!
<tdclass="mystyle"width="541"></td></tr><tr><tdcolspan="3"><tablestyle="z-index:100;"...
<td class="mystyle" width="541"></td>
</tr>
<tr>
<td colspan="3"><table style="z-index: 100;" border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td valign="top" width="7"><img src="ic/23.gif" height="120" width="7"></td>
<td align="middle" valign="center" width="906"><%
set newsproducts=server.createobject("adodb.recordset")
exec="select top 5 * from [products] order by px_id asc "
newsproducts.open exec,conn,1,1
if newsproducts.eof and newsproducts.bof then
response.Write(" 暂无最新产品 !")
end if%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="left">
<tr>
<%
dim i
i=1
do while not newsproducts.eof
%>
<td><table width="100%" border="0" cellpadding="0" cellspacing="1" align="left">
<tr>
<td><div align="center"><a href="ShowProducts.asp?id=<%=newsproducts("id")%>"
class="img" title="<%=newsproducts("title")%>"><img src="<%=newsproducts("img")%>" width="100" height="80"
border="0" /></a></div></td>
</tr>
<tr>
<td><div align="center"><a href="ShowProducts.asp?id=<%=newsproducts("id")%>"
title="<%=newsproducts("title")%>"><%=InterceptString(newsproducts("title"),22)%></a></div></td>
</tr>
</table></td>
<%
if i mod 40 =0 then
response.Write "<tr>"
end if
i=i+1
newsproducts.movenext
loop
newsproducts.close
set newsproducts=nothing
%>
</td> </tr>
</tbody>
</table></td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
以上是我的原代码。
谢谢 展开
</tr>
<tr>
<td colspan="3"><table style="z-index: 100;" border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td valign="top" width="7"><img src="ic/23.gif" height="120" width="7"></td>
<td align="middle" valign="center" width="906"><%
set newsproducts=server.createobject("adodb.recordset")
exec="select top 5 * from [products] order by px_id asc "
newsproducts.open exec,conn,1,1
if newsproducts.eof and newsproducts.bof then
response.Write(" 暂无最新产品 !")
end if%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="left">
<tr>
<%
dim i
i=1
do while not newsproducts.eof
%>
<td><table width="100%" border="0" cellpadding="0" cellspacing="1" align="left">
<tr>
<td><div align="center"><a href="ShowProducts.asp?id=<%=newsproducts("id")%>"
class="img" title="<%=newsproducts("title")%>"><img src="<%=newsproducts("img")%>" width="100" height="80"
border="0" /></a></div></td>
</tr>
<tr>
<td><div align="center"><a href="ShowProducts.asp?id=<%=newsproducts("id")%>"
title="<%=newsproducts("title")%>"><%=InterceptString(newsproducts("title"),22)%></a></div></td>
</tr>
</table></td>
<%
if i mod 40 =0 then
response.Write "<tr>"
end if
i=i+1
newsproducts.movenext
loop
newsproducts.close
set newsproducts=nothing
%>
</td> </tr>
</tbody>
</table></td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
以上是我的原代码。
谢谢 展开
2个回答
展开全部
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询