1. 论坛系统升级为Xenforo,欢迎大家测试!
    排除公告

坛子的代码问题!

本帖由 一旧云2005-11-14 发布。版面名称:源码讨论

  1. 一旧云

    一旧云 New Member

    注册:
    2005-09-04
    帖子:
    57
    赞:
    0
    www.selly.cn
    这是我的坛子
    但不知为何我加入了如下代码后
    坛子左下角就是显示不了那个"缘"字
    望版主指教~


    <SCRIPT language=JavaScript>
    <!--
    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
    }
    var POSITION = 100
    var DELAY = 5
    var MESSAGE = "..::聚缘坊::.."
    var scroll = new statusMessageObject()
    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>
     
  2. Kevin

    Kevin New Member

    注册:
    2005-10-23
    帖子:
    12,728
    赞:
    55
    不是显示了吗?
     
  3. 一旧云

    一旧云 New Member

    注册:
    2005-09-04
    帖子:
    57
    赞:
    0
    上我的坛子看看
    是左下角的那个
    不左上角