<script language="javascript">
var numslides=0;
var currentslide=0;
var oldslide=4;
var x=0;
var slide = new Array();
function MakeSlideShow(){
imags = document.getElementsByTagName("img");
for(i=0;i<imags.length;i++){
for(imags[i].className!="slide")
continue;
slides[numslides]=img[i];
if(numslides=0){
imags[i].style.zIndex=4;
}
else{
imags[i].style.zIndex=0;
}
imgs[i].onclick = NextSlide;
numslides++;
}
function NextSlide(){
slide[currentslide].style.zIndex=4;
slide[oldslide].style.zIndex=0;
oldslide = currentslide;
currentslide++;
if(currentslide>=numslides)
currentslide=0;
slide[currentslide].style.left=490;
x=490;
slide[currentslide].style.zIndex=4;
AnimateSlide();
}
function AnimateSlide(){
x=x-1;
slide[currentslide].style.left=x;
slide[oldslide].style.left=x-490;
if(x>0)window.setTimeout("AnimaTeSlid();",5)
}
window.onload = MakeSlideShow;
}
</script>在浏览器看见了11行出错了,不太会弄。
1 回答
qq_青枣工作室_0
TA贡献446条经验 获得超754个赞
11行的 for(imags[i].className!="slide") 改为 if(imags[i].className!="slide")
添加回答
举报
0/150
提交
取消