用for循环呀 for(let i = 0; i < 10; i++) { document.getElementById('img' + i).setAttribute('src', img[(index + i) % img.length]); }
用
for
循环呀