• 注册

marquee制作连续不间断滚动效果

<DIV id=marq style="OVERFLOW: hidden; WIDTH: 200px; HEIGHT: 150px; padding-top:3px;">
<TABLE cellPadding=0 align=left border=0 cellspace="0">
<TR>
<TD id=marq1 vAlign=top>
<a href="#" target="_blank">
<img src="images/Report1.gif" border="0" width="84" height="140"><img src="images/Report2.gif" border="0" width="84" height="140"><img src="images/Report3.gif" border="0" width="84" height="140"><img src="images/Report4.gif" border="0" width="84" height="140"><img src="images/report5.gif" border="0" width="84" height="140"><img src="images/report6.gif" border="0" width="84" height="140">
</a>
</TD>
<TD id=marq2 vAlign=top></TD>
</TR>
</TABLE>
</DIV>
<br /><br /><br /><br />

<SCRIPT>
var speed=30
marq2.innerHTML=marq1.innerHTML
function Marquee(){
if(marq2.offsetWidth-marq.scrollLeft<=0){
marq.scrollLeft-=marq1.offsetWidth
}else{
marq.scrollLeft++
}
}
var MyMar=setInterval(Marquee,speed)
marq.onmouseover=function() {clearInterval(MyMar)}
marq.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</SCRIPT>

 

发表评论 

我还是想用邮箱注册

登录

忘记密码 ?

用第三方帐号快捷登录

已有账户?前往登录吧~

注册