首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

求从数据库中读取图片并从右到左滚动的代码,该怎么处理

2012-02-09 
求从数据库中读取图片并从右到左滚动的代码如题:表名:products,图片字段名:hw_pic[解决办法]以下是我正在

求从数据库中读取图片并从右到左滚动的代码
如题:
表名:products,图片字段名:hw_pic

[解决办法]
以下是我正在用的,你对象修改一下字段即可。picwen=1的是意思是只用picwen字段为1的时候才从数据库中读出该数据,你要是没有限制的话可以不用的

C# code
<marquee scrollamount="2" height="131" width="697" onMouseOver="this.stop()" onMouseOut="this.start()"> <table> <tr> <%             set rs=server.createobject("adodb.recordset")             sql="select top 6 * from news where picwen=1 order by id desc"             RS.open sql,conn,1,1             if RS.bof and RS.eof then             Response.Write("暂时没有图片")             else             for i=1 to 6             %> <td> <table border="0" width="10%" id="table1">     <tr>         <td>         <a href="show.asp?/<%= RS("id") %>.html" target="_blank" title="<%=RS("title")%>"> <img src="<%=RS("picurl")%>" border="0" width="140" height="130"> </a> </td>     </tr>     <tr>         <td> <p align="center"><a href="show.asp?id=<%=RS("id")%>" target="_blank" title="<%=RS("title")%>"> <%=RS("title")%> </a> </td>     </tr> </table> </td> <%             RS.movenext             next             set pic=nothing             RS.close             end if             %> </tr> </table></marquee> 

热点排行
Bad Request.