最新状态栏文字从右到左移动_js特效代码

以下是三零网为大家整理的最新状态栏文字从右到左移动_js特效代码的文章,希望大家能够喜欢!


<script>
<!-- Beginning of JavaScript Applet -------------------
function scrollit_r2l(seed)
<!-- 改变下面的文字变换状态栏显示的文字-->
{ var m1  = "状态栏文字从右到左移动_js特效代码" ;
 var m2  = "" ;
       var msg=m1+m2;
       var out = " "; 
       var c = 1; 
<!-- 改变下面的数字改变移动速度,数字越大速度越慢-->
 var speed  = 100;
if (seed > 100)
{                seed-=2;
                var cmd="scrollit_r2l(" + seed + ")";   
             timerTwo=window.setTimeout(cmd,speed);}     
    else if (seed <= 100 && seed > 0)
     {                for (c=0 ; c < seed ; c++)
                      {       out+=" ";}   
       out+=msg;         seed-=2;      
   var cmd="scrollit_r2l(" + seed + ")";      
   window.status=out;         
 timerTwo=window.setTimeout(cmd,speed); }        
      else if (seed <= 0) 
{                if (-seed < msg.length) 
                  { 
                       out+=msg.substring(-seed,msg.length);        
                       seed-=2;                        
                       var cmd="scrollit_r2l(" + seed + ")";         
                       window.status=out;                     
       timerTwo=window.setTimeout(cmd,speed);}
       else {               window.status=" ";       
                 timerTwo=window.setTimeout("scrollit_r2l(100)",speed);
}
}
}
scrollit_r2l(100);
// -- End of JavaScript code -->
</script>

转载来自:http://www.q3060.com/list3/list115/331.html