代码:.getElementsByClassName('right')[0];
// 设置背景图片
frontBox.style.backgroundImage = 'url(./img/' + (i + 1).toString().padStart(2, '0') + '.jpg)';
leftBox.style.backgroundImage = 'url(./img/' + (i + 1).toString().padStart(2, '0') + '.jpg)';
rightBox.style.backgroundImage = 'url(./img/' + (i + 1).toString().padStart(2, '0') + '.jpg)';
}
报错:he server responded with a status of 404 (NOT FOUND)
访问的文件也是/img/02.jpg |