let index=0;
const images=["path1.jpg","path2.jpg","path3.jpg"];
function slideshow(){
document.getElementById("slideshow").innerHTML=`<img src="${images[index]}"/>`;
index++;
if(index>=images.length){
index=0;
}
}
setInterval(slideshow,1000);
没有回复内容