?? for(var i=0; i<oLi.length;i++){? ? ? ? ?oLi[i].index = i;? ? ? ? ?oLi[i].onclick = function(){? ? ? ? ? ? ?for(var n=0;n<oLi.length;n++){? ? ? ? ? ? ? ? ?oLi[n].className = "";? ? ? ? ? ? ? ? ?oDiv[n].className = "hide";? ? ? ? ? ? ?}? ? ? ? ? ? ?this.className = "on";? ? ? ? ? ? ?oDiv[this.index].className = "";? ? ? ? ?}? ? ?};
index,搞不懂為啥倆個(gè)i js進(jìn)階篇10-1
qq_lzY
2016-02-04 11:53:14