asp图片循环
为什么我的图片循环出来之后有一圈紫色的边框...这是为什么啊.代码如下.<%setrs=server.CreateObject("adodb.recordset")rs....
为什么我的图片循环出来之后有一圈 紫色的边框...这是为什么啊.代码如下.
<%
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from pic order by id desc",conn,1,3
%>
<div id="demo" style="overflow:hidden;width:570px;color:#ffffff;">
<table cellpadding="0" cellspacing="0" border="0">
<tr><td id="demo1" valign="top" align="center">
<table border="0" cellpadding="2" cellspacing="0">
<tr align="center">
<%
for i=0 to 5
if rs.bof or rs.eof then exit for
%>
<td><a href="#"><img src="<%=rs("pic")%>" width="88"></a></td>
<%
rs.movenext()
next
%>
</tr>
</table>
</td>
<td id="demo2" valign="top"></td>
</tr>
</table>
</div>
<script>
var speed=3//速度数值越大速度越慢
demo2.innerHTML=demo1.innerHTML
function Marquee(){
if(demo2.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo1.offsetWidth
else{
demo.scrollLeft++
}
}
var MyMar=setInterval(Marquee,speed)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script> 展开
<%
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from pic order by id desc",conn,1,3
%>
<div id="demo" style="overflow:hidden;width:570px;color:#ffffff;">
<table cellpadding="0" cellspacing="0" border="0">
<tr><td id="demo1" valign="top" align="center">
<table border="0" cellpadding="2" cellspacing="0">
<tr align="center">
<%
for i=0 to 5
if rs.bof or rs.eof then exit for
%>
<td><a href="#"><img src="<%=rs("pic")%>" width="88"></a></td>
<%
rs.movenext()
next
%>
</tr>
</table>
</td>
<td id="demo2" valign="top"></td>
</tr>
</table>
</div>
<script>
var speed=3//速度数值越大速度越慢
demo2.innerHTML=demo1.innerHTML
function Marquee(){
if(demo2.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo1.offsetWidth
else{
demo.scrollLeft++
}
}
var MyMar=setInterval(Marquee,speed)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询