滚动经典最新话题[prototype框架]下编写

2019-06-03 18:43:21丽君

        this.m_scroll_1 = $(arguments[1]);
        this.m_scroll_2 = $(arguments[2]);
        this.m_speed = (arguments[3][0])?arguments[3][0]:3;
        this.m_request = (arguments[3][1])?arguments[3][1]:60;
        this.m_loop = (arguments[3][2])?arguments[3][2]:0.05;
        this.m_url = (arguments[3][3])?arguments[3][3]:'http://bbs.blueidea.com/rss.php?fid=1';
        }catch(e){}
        finally{}
        Event.observe(this.m_scroll, 'mouseover', this.mouseover.bindAsEventListener(this), false);
        Event.observe(this.m_scroll, 'mouseout',  this.mouseout.bindAsEventListener(this), false);
        new PeriodicalExecuter(this.scroll.bindAsEventListener(this), this.m_loop);
        new PeriodicalExecuter(this.load.bindAsEventListener(this),   this.m_request);
        this.load();
    },
    load:function(){
        var request = new Ajax.Request(
          this.m_url,
          {
            method:    'post',
            onSuccess: this.update.bindAsEventListener(this),
            onFailure: false,
            on304:     false
          }
        );
    },
    update:function(request){
        var items = request.responseXML.getElementsByTagName("item");
        for(var i=0;i<items.length;i++){

            var title = items[i].childNodes[0].childNodes[0].nodeValue;
            var link = items[i].childNodes[1].childNodes[0].nodeValue;
            var description = items[i].childNodes[2].childNodes[0].nodeValue;