我這個(gè)顏色怎么改變不了
? ? 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";
? ? ? ? }
? ? ? ? ? }
2019-05-24
2019-06-05
樓上回答的非常正確