asp中让动态图片滚动
一点都不动。。。麻烦问下在哪里加入代码加啥。。。谢谢<tr><tdalign="left"><%settuijian=server.createobject("adodb...
一点都不动。。。麻烦问下在哪里加入代码加啥。。。谢谢
<tr>
<td align="left"><%
set tuijian=server.createobject("adodb.recordset")
exec="select top "&config("sytuijianproducts")&" * from [products] where tuijian=1 order by id desc "
tuijian.open exec,conn,1,1
if tuijian.eof and tuijian.bof then
response.Write(" 暂无推荐产品 !")
end if
%>
<% %>
<table cellspacing=0 cellpadding=0 align=center border=0>
<tbody>
<tr>
<td id=marquePic1 valign=top><table height=130 cellspacing=0 cellpadding=0 border=0>
<tbody>
<tr>
<td align=middle width=103><table border="0" cellspacing="0" cellpadding="0">
<tr>
<%
dim ii
ii=1
do while not tuijian.eof
%>
<td><table width="100%" border="0" cellpadding="5" cellspacing="1">
<tr>
<td width="104"><a href="ShowProducts.asp?id=<%=tuijian("id")%>" class="img" title="<%=tuijian("title")%>"><img src="<%=tuijian("img")%>" width="100" height="100" /></a></td>
</tr>
<tr>
<td><a href="ShowProducts.asp?id=<%=tuijian("id")%>" title="<%=tuijian("title")%>"><%=InterceptString(tuijian("title"),17)%></a></td>
</tr>
</table></td>
<%
if ii mod 8=0 then
response.Write "<tr>"
end if
ii=ii+1
tuijian.movenext
loop
tuijian.close
set tuijian=nothing
%>
</tr>
</table></td>
</tr>
</tbody>
</table></td>
<td id=marquePic2 valign=top></td>
</tr>
</tbody>
</table>
</td>
</tr> 展开
<tr>
<td align="left"><%
set tuijian=server.createobject("adodb.recordset")
exec="select top "&config("sytuijianproducts")&" * from [products] where tuijian=1 order by id desc "
tuijian.open exec,conn,1,1
if tuijian.eof and tuijian.bof then
response.Write(" 暂无推荐产品 !")
end if
%>
<% %>
<table cellspacing=0 cellpadding=0 align=center border=0>
<tbody>
<tr>
<td id=marquePic1 valign=top><table height=130 cellspacing=0 cellpadding=0 border=0>
<tbody>
<tr>
<td align=middle width=103><table border="0" cellspacing="0" cellpadding="0">
<tr>
<%
dim ii
ii=1
do while not tuijian.eof
%>
<td><table width="100%" border="0" cellpadding="5" cellspacing="1">
<tr>
<td width="104"><a href="ShowProducts.asp?id=<%=tuijian("id")%>" class="img" title="<%=tuijian("title")%>"><img src="<%=tuijian("img")%>" width="100" height="100" /></a></td>
</tr>
<tr>
<td><a href="ShowProducts.asp?id=<%=tuijian("id")%>" title="<%=tuijian("title")%>"><%=InterceptString(tuijian("title"),17)%></a></td>
</tr>
</table></td>
<%
if ii mod 8=0 then
response.Write "<tr>"
end if
ii=ii+1
tuijian.movenext
loop
tuijian.close
set tuijian=nothing
%>
</tr>
</table></td>
</tr>
</tbody>
</table></td>
<td id=marquePic2 valign=top></td>
</tr>
</tbody>
</table>
</td>
</tr> 展开
3个回答
2010-08-20
展开全部
<div id=demo style="OVERFLOW: hidden; WIDTH: 520px; HEIGHT: 163px" >
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left" id=demo1><table width="120" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<%
sql="select top 10 * from product"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
if not rs.eof then
do while not rs.eof
%>
<td align="left"><table width="120" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="top"><table width="75" border="0" cellpadding="3" cellspacing="0" class="border">
<tr>
<td valign="middle" align="center"><img src="<%=rs("pic1")%>" width="75" height="114" border="0" alt="<%=rs("title")%>" /></td>
</tr>
</table></td>
</tr>
<tr>
<td height="20" align="center"><a href="product_detail_<%=rs("id")%>.html" class="b_12px" title="<%=rs("title")%>" target="_blank"><%=rs("title")%></a></td>
</tr>
</table></td>
<%
rs.movenext
loop
end if
rs.close
set rs=nothing
%>
</table></td>
<td id=demo2 ></td>
</tr>
</table>
</div>
<SCRIPT>
var speed=30
demo2.innerHTML=demo1.innerHTML
function Marquee1(){
if(demo2.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo1.offsetWidth
else{
demo.scrollLeft++
}
}
var MyMar1=setInterval(Marquee1,speed)
demo.onmouseover=function() {clearInterval(MyMar1)}
demo.onmouseout=function() {MyMar1=setInterval(Marquee1,speed)}
</SCRIPT>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left" id=demo1><table width="120" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<%
sql="select top 10 * from product"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
if not rs.eof then
do while not rs.eof
%>
<td align="left"><table width="120" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="top"><table width="75" border="0" cellpadding="3" cellspacing="0" class="border">
<tr>
<td valign="middle" align="center"><img src="<%=rs("pic1")%>" width="75" height="114" border="0" alt="<%=rs("title")%>" /></td>
</tr>
</table></td>
</tr>
<tr>
<td height="20" align="center"><a href="product_detail_<%=rs("id")%>.html" class="b_12px" title="<%=rs("title")%>" target="_blank"><%=rs("title")%></a></td>
</tr>
</table></td>
<%
rs.movenext
loop
end if
rs.close
set rs=nothing
%>
</table></td>
<td id=demo2 ></td>
</tr>
</table>
</div>
<SCRIPT>
var speed=30
demo2.innerHTML=demo1.innerHTML
function Marquee1(){
if(demo2.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo1.offsetWidth
else{
demo.scrollLeft++
}
}
var MyMar1=setInterval(Marquee1,speed)
demo.onmouseover=function() {clearInterval(MyMar1)}
demo.onmouseout=function() {MyMar1=setInterval(Marquee1,speed)}
</SCRIPT>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
图动是.Marquee看你怎么嵌入了.
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询