在此脚本上需要有关自动幻灯片放映的帮助:
NewImg = new Array (
"images/Pic03.png",
"images/Pic01.jpg",
"images/Pic02.jpg"
);
var random_display = 0;
var ImgNum = 0;
var ImgLength = NewImg.length - 1;
var totalImages = NewImage.l
//Time delay between Slides in milliseconds
var delay = 1500;
var lock = true;
var run;
function chgImg(direction) {
if (document.images) {
ImgNum = ImgNum + direction;
if (ImgNum > ImgLength) {
ImgNum = 0;
}
if (ImgNum < 0) {
ImgNum = ImgLength;
}
document.slideshow.src = NewImg[ImgNum];
}
}
我的下一个和后退按钮没问题,但幻灯片显示没有自动播放。