多条跑马灯文字效果

效果见下面

首先将下面的代码COPY到你网页<head></head>中......

<script language="JavaScript">
var max=0;
function textlist()
{
max=textlist.arguments.length;
for (i=0; i<max; i++)
this[i]=textlist.arguments[i];
}
tl=new textlist
("新一年新变化,新一年新起点!!!","欢迎您光临电脑学习网!!!","我们将带给您全方位的服务!!!","本站网址:http://xuelijun.muetang.com","电子信箱:good_sgy@tom.com ");
var x=0; pos=0;
var l=tl[0].length;
function textticker()
{
document.tickform.tickfield.value=tl[x].substring(0,pos)+"_";

if(x==0) pos++;
else pos+=2 ;

if(pos>l)
{
pos=0; setTimeout("textticker()",1000); x++;
if(x==max) x=0; l=tl[x].length;
} else
{
if(x==0) setTimeout("textticker()",50)
else setTimeout("textticker()",100);
}
}
</script>

然后修改标签<body>为<body onload="textticker()">最后将下面代码加入到你网页适当的位置即可......

<form name="tickform">
<input type="text" size="50" name="tickfield" style="background-color: #FF99FF; color: #0000FF; border-style: groove">
</form>


在这个效果中,信息的数目可以增加减少,也可修改显示的色彩,呵呵~~你自己看着办吧!!在此希望你可以给本站做链接,谢谢!!!

关闭这个窗口