lcs1986
2015-09-17 16:16
var bindColor = function(){
for(var i = 0; i < as.length; i++)
{
var tr = as[i].parentNode.parentNode;
// tr.onmouseover = function(){
// this.style.backgroundColor ="#f2f2f2";
// }
// tr.onmouseout = function(){
// this.style.backgroundColor ="#fff";
// }
addEvent(tr,"onmouseover",function(){
this.style.backgroundColor ="#f2f2f2";
})
addEvent(tr,"onmouseout",function(){
this.style.backgroundColor ="#fff";
})
}
}
问题已解决!
JavaScript进阶篇
468194 学习 · 21891 问题
相似问题