jyj收获旅行百度云:如何实现图片左右循环滚动,请帮忙改一下代码!谢谢

来源:百度文库 编辑:高考问答 时间:2024/04/28 15:27:29
<div id=mvp style=overflow:hidden;height:90;width:812;background:white;color:white>
<table width="812" height="86" border=0 align=left cellpadding=0 cellspace=0>
<tr>
<td id=mvp1 valign=top><img src="uploadimg/news_2006720155859.gif" width="108" height="81"> <IMG height=81 src="guanggao/078.jpg" width=108
border=0> <IMG height=81 src="guanggao/087.jpg" width=108
border=0> <IMG height=81 src="guanggao/088.jpg" width=108
border=0> <img src="uploadimg/news_2004321231840.jpg" width="108" height="81"> <img src="uploadimg/03.jpg" width="108" height="81"> <img src="uploadimg/01.jpg" width="108" height="81"></td>
<td id=mvp2 valign=top></td>
</tr>
</table>
</div>
<script>
var speed=30
mvp2.innerHTML=mvp1.innerHTML
function Marquee(){

if(mvp2.offsetWidth-mvp.scrollLeft<=0)
mvp.scrollLeft-=mvp1.offsetWidth
else{
mvp.scrollLeft++
}
}
var MyMar=setInterval(Marquee,speed)
mvp.onmouseover=function() {clearInterval(MyMar)}
mvp.onmouseout=function() {MyMar=setInterval(Marquee,speed)}

</script>

这是一段图片左右缝合滚动的代码,但是只能滚动两圈,不能循环滚动,有哪位高手能够实现循环滚动,谢谢!

如果没人回答你的问题请把我设为最佳答案,谢谢!我的分少得可怜,反正你不管怎样分都会减去,不如成全我?