亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

總是報錯,小黃點不能點~球解決~~~

window.onload=function(){
? ?var con=document.getElementById('con');
? ?var list=document.getElementById('list');
? ?var button=document.getElementById('button').getElementsByClassName('span');
? ?var prev=document.getElementById('prev');
? ?var next=document.getElementById('next');
? ?var index=1;

? ?function showButton(){
? ? ? ?button[index-1].className='on';

? ?}
? ?function animate(offset){
? ? ? ?var newleft=parseInt(list.style.left) +offset;
? ? ? ?list.style.left = newleft+ 'px';

? ? ? ?if(newleft>-730){
? ? ? ? ? ?list.style.left=-3650+'px';
? ? ? ?}
? ? ? ?if(newleft<-3650){
? ? ? ? ? ?list.style.left=-730+'px';
? ? ? ?}
? ?}
? ?next.onclick=function() {
? ? ? ?index += 1;
? ? ? ?showButton();
? ? ? ?animate(-730);
? ?}
? ?prev.onclick=function() {
? ? ? ?index -= 1;
? ? ? ?showButton();
? ? ? ?animate(730);
? ?}


}

正在回答

1 回答

for (var i = 0; i < buttons.length; i++) {

? ? ? ? ? ? ? ? buttons[i].onclick = function(){

? ? ? ? ? ? ? ? ? ? if (this.className == 'on') {

? ? ? ? ? ? ? ? ? ? ? ? return;

? ? ? ? ? ? ? ? ? ? }

? ? ? ? ? ? ? ? ? ? var myIndex = this.getAttribute('index');

? ? ? ? ? ? ? ? ? ? offset = -600 *(myIndex - index);

? ? ? ? ? ? ? ? ? ? animate(offset);

? ? ? ? ? ? ? ? ? ? index = myIndex;

? ? ? ? ? ? ? ? ? ? showbutton();

? ? ? ? ? ? ? ? }

? ? ? ? ? ? }

加上這些

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

總是報錯,小黃點不能點~球解決~~~

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號