日期:2014-05-17  浏览次数:20963 次

图片向左不间断滚动
这段JS向上不间断滚动是正常的,但是我改成向左滚动就不行,不知道该怎么改:

<!--向上滚动代码开始-->
<DIV   id=rolllink   style= "OVERFLOW:   hidden;   WIDTH:   162px;   HEIGHT:   120px ">
<DIV   id=rolllink1   style= "WIDTH:   122px;   HEIGHT:   560px ">
<TABLE   cellSpacing=5   width= "100% ">
<tr>
<td   id=demo11   vAlign=top   width= "160 ">
<img   src= "http://www.leyan.net/templates/sina/images/1.jpg ">
<img   src= "http://www.leyan.net/templates/sina/images/2.jpg ">
<img   src= "http://www.leyan.net/templates/sina/images/3.jpg ">
<img   src= "http://www.leyan.net/templates/sina/images/4.jpg ">
</td>
<td   id=demo12   vAlign=top> </td>
</tr>  
</TABLE>
</DIV>
<DIV   id=rolllink2> </DIV>
</DIV>
<SCRIPT>
var   rollspeed=10
rolllink2.innerHTML=rolllink1.innerHTML
function   Marquee(){
if(rolllink2.offsetTop-rolllink.scrollTop <=0)
rolllink.scrollTop-=rolllink1.offsetHeight
else{
rolllink.scrollTop++
}
}
var   MyMar=setInterval(Marquee,rollspeed)
rolllink.onmouseover=function()   {clearInterval(MyMar)}
rolllink.onmouseout=function()   {MyMar=setInterval(Marquee,rollspeed)}
</SCRIPT>
<!--滚动代码结束-->

------解决方案--------------------
用JS实现,网上很多
------解决方案--------------------
参考:
http://www.jxxg.com/blog/dh20156_369/article.asp?id=5