我这个颜色怎么改变不了
window.onload = function(){
var tr=document.getElementsByTagName("tr");
for(var i= 0;i<tr.length;i++)
{
tr[i].onmouseover=function(){
tr[i].style.backgroundColor="#f2f2f2";
}
tr[i].onmouseout=function(){
tr[i].style.backgroundColor="#fff";
}
}