最赞回答 / 任性不是罪
<...code...>写成这样可以实现图片的切换,但是获取的是buttons元素而不是buttons下的span元素,如果把注释的那一行换成不注释的话,就不能运行了,这是怎么回事,我前两天用的时候,还可以的???
2016-07-20
最赞回答 / 任性不是罪
var buttons = document.getElementById('buttons').getElementsByTagName("span");这一句错了,获取的是buttons下面的五个按钮,而不是buttons。
2016-07-19
最赞回答 / 善良的兔子
prev.onclick=function(){ if(!animated){ if(index==1){ index=5; }else{ index-=1; } showButton(); animate(700); } }把animared的判断提前就好了,你试试
2016-07-17