 
		慕妹小白嫣嫣
2020-03-13 10:24
能帮我看看这段代码哪儿有问题吗?
 
				我也是这样写的,运行不出来
 
				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 循环里有问题,可以去看看闭包
JavaScript进阶篇
469062 学习 · 22582 问题
相似问题