JavaScript报错,TypeError: this._setPara is not a function
大家讲道理
大家讲道理 2016-11-11 11:42:02
0
1
735

下是一段获取元素位置,并通过判断index值,使其向左或向右运动的代码局部。在运行过程中报错,this._setPara is not a funtion...百思不得其解,请各位指教~多谢~

  _setPara : function(){
            this._b = this.swContainer.css("left");
            this._move();
        },
        moveLeft : function(){
            this._setPara();
            this.index++;
            if(this.index == this.swCounter){
                setTimeout(this.moveRight, this.swDuration);
            }else{
                setTimeout(this.moveLeft, this.swDuration);
            }
        },
        moveRight : function(){
            this._setPara();
            this.index--;
            if(this.index == 0){
                setTimeout(this.moveLeft, this.swDuration);
            }else{
                setTimeout(this.moveRight, this.swDuration);
            }
        },


大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage
Über uns Haftungsausschluss Sitemap
Chinesische PHP-Website:Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!