|
|
| 状态栏飞行的文字 |
| 整理:Cnwshow.Com 来源:Internet 整理时间:2008-2-16 |
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>状态栏飞行的文字</title>
<SCRIPT language="JavaScript">
function ScrollText(seed)
{
var msg = "欢迎来到中国个人网页秀!";
var out = " ";
var c = 1;
if (seed > 100)
{
seed--;
var cmd="ScrollText(" + seed + ")";
timerTwo=window.setTimeout(cmd,100);
}
else if (seed <= 100 && seed > 0)
{
for (c=0 ; c < seed ; c++)
{
out+=" ";
}
out+=msg;
seed--;
var cmd="ScrollText(" + seed + ")";
window.status=out;
timerTwo=window.setTimeout(cmd,100);
}
else if (seed <= 0)
{
if (-seed < msg.length)
{
out+=msg.substring(-seed,msg.length);
seed--;
var cmd="ScrollText(" + seed + ")";
window.status=out;
timerTwo=window.setTimeout(cmd,100);
}
else
{
window.status=" ";
timerTwo=window.setTimeout("ScrollText(100)",75);
}
}
}
</SCRIPT>
</HEAD>
<BODY OnLoad="timerONE=window.setTimeout('ScrollText(100)',100);">
<p></p>
<p>说明:请看状态栏的效果.</p>
</body>
</html>
|
|
|
|
|
|