状态栏有间隔的跳马灯式样的文字

- 中国WEB开发者网络 (http://www.webasp.net)
-- 网页特效 (http://www.webasp.net/javascript/)
--- 状态栏有间隔的跳马灯式样的文字 (http://www.webasp.net/javascript/1/178.htm)
-- 发布日期: 2004-06-17
<!-- 网页特效代码由[中国WEB开发者网络:http://www.ChinaWebDev.com]提供! -->
<!-- 要实现此效果需要 2 个步骤: -->

<!-- 第 1 步: -->
<!-- 把下面的代码加到<HEAD></HEAD>区域中: -->

<SCRIPT language="JavaScript">

function scrollit(seed) {

var m1 = "HI:你 好! ";

var m2 = "欢 迎 访 问 中 国 WEB 开 发 者 网 络";

var m3 = "请 多 提 意 见,谢 谢! ";

var msg=m1+m2+m3;

var out = " ";

var c = 1;

if (seed > 100) {

seed--;

cmd="scrollit("+seed+")";

timerTwo=window.setTimeout(cmd,100);

}

else if (seed <= 100 && seed > 0) {

for (c=0 ; c < seed ; c++) {

out+=" ";

}

out+=msg;

seed--;

window.status=out;

cmd="scrollit("+seed+")";

timerTwo=window.setTimeout(cmd,100);

}

else if (seed <= 0) {

if (-seed < msg.length) {

out+=msg.substring(-seed,msg.length);

seed--;

window.status=out;

cmd="scrollit("+seed+")";

timerTwo=window.setTimeout(cmd,100);

}

else {

window.status=" ";

timerTwo=window.setTimeout("scrollit(100)",75);

}

}

}

</SCRIPT>




<!-- 第 2 步: -->
<!-- 把<BODY>中的属性代码改为: -->

<BODY onLoad="scrollit(100)">




webasp.net