QUOTE:
滚动字大全
QUOTE:
<marquee scrollamount=1>
文字很慢滚。
</marquee>
<marquee onmouseover=this.stop() onmouseout=this.start() >
鼠标放上去停止滚动,移开继续滚动。
</marquee>
<marquee direction=left scrollamount=3>
文字向左滚。
</marquee>
<marquee direction=right scrollamount=3>
文字向右滚。
</marquee>
<marquee direction=up scrollamount=3>
文字向上滚。
</marquee>
<marquee direction=down scrollamount=3>
文字向下滚。
</marquee>
<marquee scrollamount=3 behavior=alternate>
文字来回滚。
</marquee>
<marquee scrolldelay=500 scrollamount=100>走一步,停一停!</marquee>
QUOTE:
公告栏上下滚动字幕代码
[Copy to clipboard]
CODE:
<marquee direction=up TrueSpeed scrollAmount=1 scrollDelay=40 height=100 onMouseOut=this.start(); onMouseOver=this.stop(); width=150 border="0"> 加入你想要写的文字</marquee>
状态栏文字从右依次弹出
[Copy to clipboard]
CODE:
<script language="JavaScript">var MESSAGE="文字从右边一个个弹出";var POSITION = 150;var DELAY = 10;var scroll = new statusMessageObject();function statusMessageObject(p,d){this.msg = MESSAGE;this.out = " ";this.pos = POSITION;this.delay = DELAY;this.i=0;this.reset = clearMessage};function clearMessage(){this.pos = POSITION};function scroller(){for(scroll.i=0;scroll.i<scroll.pos; scroll.i++);{scroll.out+=" "};if(scroll.pos >= 0) scroll.out += scroll.msg; else scroll.out = scroll.msg.substring(-scroll.pos,scroll.msg.length);window.status = scroll.out;scroll.out = " "; scroll.pos--; if(scroll.pos < -(scroll.msg.length)){ scroll.reset()}; setTimeout ('scroller()',scroll.delay)};function snapIn(jumpSpaces,position){var msg = scroll.msg;var out = "";for (var i=0; i<position; i++){out += msg.charAt(i)}; for (i=1;i<jumpSpaces;i++){out += " "}; out += msg.charAt(position);window.status = out;if (jumpSpaces <= 1){position++;if (msg.charAt(position) == ' '){position++ };jumpSpaces = 100-position};else if (jumpSpaces > 3){jumpSpaces *= .75};else {jumpSpaces--};if (position != msg.length){var cmd = "snapIn(" + jumpSpaces + "," + position + ")";scrollID = window.setTimeout(cmd,scroll.delay);} else { window.status="";jumpSpaces=0; position=0; cmd ="snapIn(" + jumpSpaces + "," + position + ")";scrollID = window.setTimeout(cmd,scroll.delay); return false }; return true};snapIn(100,0);</script>
状态栏文字从左依次弹出
[Copy to clipboard]
CODE:
<script language="JavaScript">var msg = "文字从左依次弹出";var interval = 120;var spacelen = 120;var space10=" ";var seq=0;function Scroll(){len = msg.length;window.status = msg.substring(0, seq+1);seq++;if ( seq >= len ){seq=0;window.status = '';window.setTimeout("Scroll();", interval);}else window.setTimeout("Scroll();", interval );}Scroll();</script>
文字在状态栏上先拆散然后再组合
[Copy to clipboard]
CODE:
<script>var speed=10;var pause=1500;var timerID=null;var bannerRunning=false;var ar=new Array();ar[0]="欢迎来到E天下论坛 ";ar[1]="希望你能找到需要的代码 ";ar[2]="请多提意见,谢谢! ";var message=0;var state="";clearState();function stopBanner(){if(bannerRunning) clearTimeout(timerID);bannerRunning = false;}function startBanner(){stopBanner();showBanner();}
function clearState(){state="";for(var i=0;i<ar[message].length;++i){state+="0"}}function showBanner(){if(getString()){message++;if(ar.length<=message) message=0;clearState();timerID=setTimeout("showBanner()", pause);bannerRunning=true}else{var str="";for(var j=0;j<state.length;++j){str+=(state.charAt(j)=="1")?ar[message].charAt(j):" "}window.status=str;timerID=setTimeout("showBanner()",speed);bannerRunning = true;}}function getString(){var full=true;for(var j=0;j<state.length;++j){if(state.charAt(j)==0)full=false}if(full)return true;while(1){var num=getRandom(ar[message].length);if(state.charAt(num)=="0")break}state=state.substring(0,num)+"1"+state.substring(num+1,state.length);return false}function getRandom(max){return Math.round((max-1)*Math.random())};startBanner()</script>
状态栏文字跑马灯
[Copy to clipboard]
CODE:
<SCRIPT language="JavaScript">function scrollit(seed){var m1 = "HI:你 好!";var m2 = "欢迎来到E天下论坛";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><script>scrollit(100)</script>
状态栏文字逐个弹出再左移的效果
[Copy to clipboard]
CODE:
<SCRIPT LANGUAGE="JavaScript">var Message="文字逐个弹出再左移的效果";var place=1;function scrollIn(){window.status=Message.substring(0, place);if (place>=Message.length){place=1;window.setTimeout("scrollOut()",300);} else{place++;window.setTimeout("scrollIn()",50);}};function scrollOut(){window.status=Message.substring(place,Message.length);if(place>=Message.length){place=1;window.setTimeout("scrollIn()",100);};else{place++;window.setTimeout("scrollOut()", 50);}};</SCRIPT><SCRIPT>scrollIn()</SCRIPT>
状态栏上的文字缩放出现
[Copy to clipboard]
CODE:
<SCRIPT>timeID=5;stcnt=11;msg="欢迎来到E天下论坛,希望您在这儿找到需要的代码。";wmsg=new Array(33);wmsg[0] = msg;blnk = " ";for(i=1;i<32;i++){b=blnk.substring(0,i);wmsg
="";for(j=0;j<msg.length; j++) wmsg=wmsg+msg.charAt(j)+b;}function wiper(){if(stcnt>-1){str=wmsg[stcnt]};else str=wmsg[0];if(stcnt--<-40)stcnt=31;status=str;clearTimeout(timeID);timeID=setTimeout("wiper()", 150);};wiper()</script>
状态栏上的文字不动,但是两边的符号却不停在动
[Copy to clipboard]
CODE:
<script>var hellotext="欢迎来到E天下论坛";var thetext="";var started=false;var step=0;var times=1;function welcometext(){times--;if(times==0){if(started==false){started=true;window.status=hellotext;setTimeout("anim()",1);}thetext=hellotext;}}function showstatustext(txt){thetext=txt;setTimeout("welcometext()",4000);times++;}function anim(){step++;if(step==7){step=1};if(step==1){window.status='>==='+thetext+'===<'};if(step==2){window.status='=>=='+thetext+'==<='};if(step==3){window.status='>=>='+thetext+'=<=<'};if(step==4){window.status='=>=>'+thetext+'<=<='};if(step==5){window.status='==>='+thetext+'=<=='};if(step==6){window.status='===>'+thetext+'<==='};setTimeout("anim()",200);};welcometext()</script>
论坛里可放在其他头部信息里或JS调用