

为什么一加上while循环,getElementById就找不到id了?
而且,我把定时器放在while里面,不是应该执行完setTimeout(tom,3000);才进入下一轮循环吗?
while(i<6){
i++; var tom = function (){document.getElementById('x'+i).style.zIndex=9999;
setTimeout(tom,3000);
};
宝慕林4294392
侃侃尔雅
随时随地看视频慕课网APP
相关分类