小圓點(diǎn)問題
?var prev = document.getElementById('prev');
? ? ? ? ? ? var next = document.getElementById('next');
? ? ? ? ? ? var index = 1;
? ? ? ? ? ??
? ? ? ? ? ?function showButton() {
? ? ? ? ? ? ? ? for (var i = 0;i<buttons.length;i++){
? ? ? ? ? ? ? ? ? ? if (buttons[i].ClassName=='on') {
? ? ? ? ? ? ? ? ? ? ? ? buttons[i].ClassName=='';
? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? buttons.[index - 1].ClassName='on';
? ? ? ? ? ? }
? ? ? ? ? ? function animate(offset){
? ? ? ? ? ? ? ? list.style.left = parseInt(list.style.left)+offset+'px';
? ? ? ? ? ? }
? ? ? ? ? ? next.onclick = function(){
? ? ? ? ? ? ? ? animate(-300);
? ? ? ? ? ? ? ? index =index+1;
? ? ? ? ? ? ? ? showButton();
? ? ? ? ? ? }
? ? ? ? ? ? ?prev.onclick = function(){
? ? ? ? ? ? ? ? animate(300);
? ? ? ? ? ? ? ? index =index-1;
? ? ? ? ? ? ? ? showButton();
? ? ? ? ? ? ? ?
? ? ? ? ? ? }
? ? ? ? ? ? ?
? ? ? ? }
為什么我這樣寫之后不能向左向右移動(dòng)了,小圓點(diǎn)也不能亮起來
2018-06-20
我只是將圖片的大小變?yōu)榱?00,其他幾乎沒變
2018-06-19
貼完整全部的,然后說明哪里有不同,或者完全沒有更改?