状态栏走马灯效果

作者在 2008-06-26 10:30:01 发布以下内容
把下面的代码放到<head> </head>中

<script>
<!--
function Helpor_net(seed)
{ var m1 = "把这段文字换成你想显示的文字。" ;
var m2 = "" ;
var msg=m1+m2;
var out = " ";
var c = 1;
var speed = 120;
if (seed > 100)
{ seed-=2;
var cmd="Helpor_net(" + 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="Helpor_net(" + seed + ")";
window.status=out;
timerTwo=window.setTimeout(cmd,speed); }
else if (seed &lt;= 0)
{ if (-seed &lt; msg.length)
{
out+=msg.substring(-seed,msg.length);
seed-=2;
var cmd="Helpor_net(" + seed + ")";
window.status=out;
timerTwo=window.setTimeout(cmd,speed);}
else { window.status=" ";
timerTwo=window.setTimeout("Helpor_net(100)",speed);
}
}
}
Helpor_net(100);
-->
</script>
特效 | 阅读 3062 次
文章评论,共0条
游客请输入验证码
浏览11997次
文章归档