排名第二的答案看不懂
? ? ? window.onload = function(){
? ? ? ? ? ? ? ? ??
? ? ?// 鼠標(biāo)移動(dòng)改變背景,可以通過(guò)給每行綁定鼠標(biāo)移上事件和鼠標(biāo)移除事件來(lái)改變所在行背景色。
? ? ? ? ? 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"');
? ? ? ?}
? ? ?
?
}
2016-07-25
這是一個(gè)判斷語(yǔ)句,條件是:'onmouseover',document.all;為true執(zhí)行:eval(function(){this.style.background="#f2f2f2"});為flase執(zhí)行:'javascript:this.style.background="#f2f2f2"
2016-08-05
同C語(yǔ)言中判斷兩個(gè)數(shù)大小的簡(jiǎn)寫(xiě),差不多的理解方式
2016-07-22
2016-07-22
哪里看不懂