定时器setInterval里面的 this 是指向window , 不再指向oli[i]了,你是在要这么用可以在 定时器之前:var This = this;然后定时器里面用 This.offsetLeft;