文本自动输入特效
脚本说明:
第一步:把如下代码加入<head>区域中
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | <SCRIPT LANGUAGE="JavaScript"> <!-- Begin var max=0; function textlist() { max=textlist.arguments.length; for (i=0; i<max; i++) this[i]=textlist.arguments[i]; } tl = new textlist( " 为网站而疯狂,为你提供一个五星级的家!喜欢我吗?就来订阅我吧!<a href="http://feed.feedsky.com/soso0_0">http://feed.feedsky.com/soso0_0</a>", "建站书籍、建站模版、网站运营...应有尽有!", " 为网站而疯狂,为你提供一个五星级的家!喜欢我吗?就来订阅我吧!<a href="http://feed.feedsky.com/soso0_0">http://feed.feedsky.com/soso0_0</a>", "建站书籍、建站模版、网站运营...应有尽有!" ); var x = 0; pos = 0; var l = tl[0].length; function textticker() { document.tickform.tickfield.value = tl[x].substring(0, pos) + "_"; if(pos++ == l) { pos = 0; setTimeout("textticker()", 2000); if(++x == max) x = 0; l = tl[x].length; } else setTimeout("textticker()", 50); } // End --> </script> </HEAD> |
第二步:把如下代码加入<body topmargin=”0″>区域中
1 2 3 | <form name=tickform> <textarea name=tickfield rows=3 cols=38 style="background-color: rgb(0,0,0); color: rgb(255,255,255); cursor: default; font-family: Arial; font-size: 12px" wrap=virtual>The news will appear here when the page has finished loading.</textarea> </form> |
第三步:把<body topmargin=”0″>改为
1 | <body bgcolor="#d6e6f7" OnLoad="textticker()"> |
效果请点击“运行”
你还可修改部分代码再运行看看哦

