如果定时器里有参数怎么写直接写不行,方法外加"也不行
timer = setInterval(autoPlay, 2000);
//autoChange(timer);
//自动播放
function autoPlay(){
index++;
if (index >= titles.length){
index = 0;
}
changeOption(index);
}如果在auto中加参数就只能执行一次了
timer = setInterval(autoPlay, 2000);
//autoChange(timer);
//自动播放
function autoPlay(){
index++;
if (index >= titles.length){
index = 0;
}
changeOption(index);
}如果在auto中加参数就只能执行一次了
2016-01-06
举报