list[otherindex].className = 'on';
pic.style.top =otherindex*-170+"px";
index=otherindex;
}
}
pic.style.top =otherindex*-170+"px";
index=otherindex;
}
}
2016-03-23
wrap.onmouseout = function () {
timer = setInterval (js,2000)
}
function changeOption (otherindex){
for (var j=0;j<list.length;j++)
{list[j].className = "";}
timer = setInterval (js,2000)
}
function changeOption (otherindex){
for (var j=0;j<list.length;j++)
{list[j].className = "";}
2016-03-23
wrap.onmouseover = function () {
clearInterval (timer);
for (var i=0;i<list.length;i++) {
list[i].id=i;
list[i].onmouseover = function(){
changeOption(this.id);
}
}
}
clearInterval (timer);
for (var i=0;i<list.length;i++) {
list[i].id=i;
list[i].onmouseover = function(){
changeOption(this.id);
}
}
}
2016-03-23
研究了半天,自己发
timer = setInterval (js,2000);
function js() {
index++;
if(index>=list.length){
index=0;
}
changeOption(index);
}
timer = setInterval (js,2000);
function js() {
index++;
if(index>=list.length){
index=0;
}
changeOption(index);
}
2016-03-23