请问第二高票的改变背景的两行代码是什么意思?如何实现的,麻烦详细解答下,谢谢
var str_tr=document.getElementsByTagName('tr'); for(var i=0;i<str_tr.length;i++){ str_tr[i].setAttribute('onmouseover',document.all ? eval(function(){this.style.background="#f2f2f2"}) : 'javascript:this.style.background="#f2f2f2"'); str_tr[i].setAttribute('onmouseout',document.all?eval(function(){this.style.background="#fff"}):'javascript:this.style.background="#fff"'); }