为什么功能可以实现,在调试时却显示Uncaught TypeError: Cannot set property 'onmouseover' of undefined
function Highlight(){
var tbody=document.getElementById("table").lastChild;
var trs=tbody.getElementsByTagName("tr");
for(var i=0;i<=trs.length;i++){
trs[i].onmouseover=function(){
this.style.backgroundColor="#f2f2f2";
}
trs[i].onmouseout=function(){
this.style.backgroundColor="#fff";
}
}
}