为什么要用this.style不直接用tr[i].style呢?
function changeColor(){
var tbody=document.getElementById("table").lastChild;
var tr=tbody.getElementsByTagName('tr');
var len=tr.length;
for(var i=0;i<len;i++){
tr[i].onmouseover = function(){
alert(this);
this.style.backgroundColor="#f2f2f2";
}
tr[i].onmouseout = function(){this.style.backgroundColor="#fff";
}
}
}在上面的代码中为什么不能写tr[i].style,有点理解不了了