<hr size="1" style="COLOR: #d8d8d8;"/><br/> <br/><div style="FONT-SIZE: 12px;"><div id="text75183"><div id="tpid75183"><div id="spid75183">网站代码 <br/><br/><br/><SCRIPT language=JavaScript><br/><!--<br/>function statusMessageObject(p,d) {<br/>this.msg = MESSAGE<br/>this.out = " "<br/>this.pos = POSITION<br/>this.delay = DELAY<br/>this.i = 0<br/>this.reset = clearMessage<br/>}<br/>function clearMessage() {<br/>this.pos = POSITION<br/>}<br/>var POSITION = 100<br/>var DELAY = 5<br/>var MESSAGE = "<font color="#ff0000">需要滚动的字</font>"<br/>var scroll = new statusMessageObject()<br/>function scroller() {<br/>for (scroll.i = 0; scroll.i < scroll.pos; scroll.i++) {<br/>scroll.out += " "<br/>}<br/>if (scroll.pos >= 0)<br/>scroll.out += scroll.msg<br/>else scroll.out = scroll.msg.substring(-scroll.pos,scroll.msg.length)<br/>window.status = scroll.out<br/>scroll.out = " "<br/>scroll.pos--<br/>if (scroll.pos < -(scroll.msg.length)) {<br/>scroll.reset()<br/>}<br/>setTimeout ('scroller()',scroll.delay)<br/>}<br/>function snapIn(jumpSpaces,position) {<br/>var msg = scroll.msg<br/>var out = ""<br/>for (var i=0; i<position; i++)<br/>{out += msg.charAt(i)}<br/>for (i=1;i<jumpSpaces;i++)<br/>{out += " "}<br/>out += msg.charAt(position)<br/>window.status = out<br/>if (jumpSpaces <= 1) {<br/>position++<br/>if (msg.charAt(position) == ' ')<br/>{position++ }<br/>jumpSpaces = 100-position<br/>} else if (jumpSpaces > 3)<br/>{jumpSpaces *= .75}<br/>else<br/>{jumpSpaces--}<br/>if (position != msg.length) {<br/>var cmd = "snapIn(" + jumpSpaces + "," + position + ")";<br/>scrollID = window.setTimeout(cmd,scroll.delay);<br/>} else {<br/>window.status=""<br/>jumpSpaces=0<br/>position=0<br/>cmd = "snapIn(" + jumpSpaces + "," + position + ")";<br/>scrollID = window.setTimeout(cmd,scroll.delay);<br/>return false<br/>}<br/>return true<br/>}<br/>snapIn(100,0);<br/>// --><br/></SCRIPT></div></div></div></div>
[此贴子已经被作者于2007-4-4 10:30:16编辑过]