本帖最后由 hotllus 于 2009-10-19 22:45 编辑
演示: http://home.elfbbs.net
打开 templates\default\footer.htm 在最后加上以下代码:
- <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>
- <META http-equiv=Page-Exit content=revealTrans(Duration=3,Transition=23)>
- <SCRIPT language=javascript> document.oncontextmenu=function(){return false;}</SCRIPT>
- <SCRIPT language=JavaScript>
- step=0
- function flash_title()
- {
- step++
- if (step==3) {step=1}
- if (step==1) {document.title='◆◇◆﹏ˇ精灵空间【http://home.elfbbs.net】ˇ﹏◇◆◇' }
- if (step==2) {document.title='◇◆◇﹏ˇ精灵空间【http://home.elfbbs.net】ˇ﹏◆◇◆' }
- setTimeout("flash_title()",200);
- }
- flash_title()
- </SCRIPT>
复制代码 你的UCH网址记得更改
2.UCH后台更新缓存,安装完毕! |