logo
当前位置:首页 >豪口福卤肉饭

豪口福卤肉饭

2013-05-10 14:04:21
 
<script> //使用div时,请保证colee_left2与colee_left1是在同一行上. var speed=30//速度数值越大速度越慢 var colee_b2=document.getElementById("colee_b2"); var colee_b1=document.getElementById("colee_b1"); var colee_b=document.getElementById("colee_b"); colee_b2.innerHTML=colee_b1.innerHTML function Marquee5(){ if(colee_b2.offsetWidth-colee_b.scrollLeft<=0)//offsetWidth 是对象的可见宽度 colee_b.scrollLeft-=colee_b1.offsetWidth//scrollWidth 是对象的实际内容的宽,不包边线宽度 else{ colee_b.scrollLeft++ } } var MyMar5=setInterval(Marquee5,speed) colee_b.onmouseover=function() {clearInterval(MyMar5)} colee_b.onmouseout=function() {MyMar5=setInterval(Marquee5,speed)} </script>
 
<script> //使用div时,请保证colee_left2与colee_left1是在同一行上. var speed=30//速度数值越大速度越慢 var colee_left2=document.getElementById("colee_left2"); var colee_left1=document.getElementById("colee_left1"); var colee_left=document.getElementById("colee_left"); colee_left2.innerHTML=colee_left1.innerHTML function Marquee3(){ if(colee_left2.offsetWidth-colee_left.scrollLeft<=0)//offsetWidth 是对象的可见宽度 colee_left.scrollLeft-=colee_left1.offsetWidth//scrollWidth 是对象的实际内容的宽,不包边线宽度 else{ colee_left.scrollLeft++ } } var MyMar3=setInterval(Marquee3,speed) colee_left.onmouseover=function() {clearInterval(MyMar3)} colee_left.onmouseout=function() {MyMar3=setInterval(Marquee3,speed)} </script>

版权所有 火旺餐饮加盟网
Copyright © 2013-2020 www.3158.hk Corporation, All Rights Reserved
鄂ICP备14014403号-1