0

現時点ではこれを持っていますが、「swapBKgnd is no defined」を返し続けます:

    var interval = self.setInterval("swapBKgnd()", 9000);

function swapBKgnd() {

    (direction === 'next') ? ++current : --current;

    if (current === 0) {
        current = imgsLenth;
        direction = 'next';
    } else if (current - 1 === imgsLenth) {
        current = 1;
        loc = 0;
    }


    transition(sliderUL, loc, direction);
};

ありがとう。

4

1 に答える 1

0

から引用符を削除しますswapBKgnd()

使用できる:

var interval = self.setInterval(swapBKgnd, 9000);

あなたは宣言していないdirectioncurrentまたはloc- それらはエラーをスローします

于 2013-04-16T17:03:44.917 に答える