封装函数五(封装排他)
function paita(domli,color){
for(var i = 0;i<domli.length;i++){
domli[i].shuzhi = i;
domli[i].onmouseenter = function(){
for(var j = 0;j<domli.length;j++){
domli[j].style.backgroundColor = ‘’;
}
domli[this.shuzhi].style.backgroundColor = color;
}
}
}
封装函数五(封装排他)
最新推荐文章于 2022-10-12 11:24:09 发布