asp推荐产品的滚动效果怎么做
- 提问者网友:龅牙恐龙妹
- 2021-04-19 17:00
set rs_Product=server.createobject("adodb.recordset")
sqltext="select top 10 * from Product where Passed=True And Elite=True order by UpdateTime desc"
rs_Product.open sqltext,conn,1,1
%>
<br>
<table width="99%" height="132" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td></td>
</tr>
<%row_count=1 %>
<tr align="center">
<% Do While Not rs_Product.EOF%>
<td height="125" valign="top"><table width="130" height="125" border="0" align="left" cellpadding="0" cellspacing="2">
<tr>
<td width="122" height="100"><div align="center"><a href="ArticleShow.asp?ArticleID=<%=rs_Product("articleid")%>"><img border=0 src=<%=rs_Product("DefaultPicUrl")%> width=100 height=100></a></div></td>
</tr>
<tr>
<td width="122" height="18"><div align="center"><a href="ArticleShow.asp?ArticleID=<%=rs_Product("articleid")%>"><%=rs_Product("Title")%></a></div></td>
</tr>
</table></td>
<%if row_count mod 5 <>0 then%>
<%end if%>
<% if row_count mod 5 =0 then%>
</tr>
<tr>
<%end if%>
<%
rs_Product.MoveNext
row_count=row_count+1
Loop
rs_Product.close
%>
</tr>
<tr>
<td height="2"></td>
</tr>
</table>
这是一段图片的代码。请问怎么弄成滚动的啊?
- 五星知识达人网友:不甚了了
- 2021-04-19 17:06
我帮你写好了,替换上去就可以用了。有事可以直接问我啊,www.sencool.net ,欢迎大家来我公司做网站。
<%
set rs_Product=server.createobject("adodb.recordset")
sqltext="select top 10 * from Product where Passed=True And Elite=True order by UpdateTime desc"
rs_Product.open sqltext,conn,1,1
%>
<SCRIPT LANGUAGE=javascript>
<!--
function movepic(){
try{
var str=marqueeStr.innerText;
var intLen1=str.length;
var intLen2=marqueeStr.offsetWidth;
var j=intLen2/intLen1;
var strTemp=marqueeStr.innerHTML;
if(j>1){
for(i=0;i<j;i++)
strTemp+=" "+marqueeStr.innerHTML;
}
marqueeStr.innerHTML=strTemp;}
catch(e){}
}
//-->
</SCRIPT>
<marquee behavior="ALTERNATE" Direction="right" scrollamount=1 scrolldelay=60 id="marqueeStr" height="100"
width="100%" loop="-1" truespeed onMouseOver="this.stop();" onMouseOut="this.start();">
<% do while not rs1.eof %>
<table width="100" height="100" border="0" align="left" cellpadding="3" cellspacing="1" bgcolor="#D7D5C6">
<tr>
<td width="122" height="100"><div align="center"><a href="ArticleShow.asp?ArticleID=<%=rs_Product("articleid")%>"><img border=0 src=<%=rs_Product("DefaultPicUrl")%> width=100 height=100></a></div></td>
</tr>
<tr>
<td width="122" height="18"><div align="center"><a href="ArticleShow.asp?ArticleID=<%=rs_Product("articleid")%>"><%=rs_Product("Title")%></a></div></td>
</tr>
</table>
<%
rs_Product.movenext
if rs_Product.eof then exit do
loop
%>
</marquee>
<%
rs_Product=nothing
rs_Product.close%>
- 1楼网友:话散在刀尖上
- 2021-04-19 19:39
我有一个效果是用javascript做的,连续不间断的,而<marquee> ... </marquee> 标签是间断的。要的话给你 QQ:529672493
- 2楼网友:千杯敬自由
- 2021-04-19 18:56
- 3楼网友:怙棘
- 2021-04-19 17:46
加<marquee> ... </marquee> 标签就可以滚动了,还有些参数是控制速度方向等等的。可以参考下网上的实例!