能帮我看看这段代码哪儿有问题吗?
我也是这样写的,运行不出来
for(var i=0;i< y.length;i++){
console.log(y[i])
y[i].onmouseover=function(){
this.style.backgroundColor= "#f2f2f2";
}
y[i].onmouseout=function(){
this.style.backgroundColor="#fff";
}
}for 循环里有问题,可以去看看闭包