?window.onload = function(){? ? ? var trs=document.getElementsByTagName("tr");? ? ? for(var i=0;i<trs.length;i++){? ? ? bgcChange(trs[i]);? ? ? }? ? ?} ? ? function bgcChange(obj){ obj.onmouseover=function(){? ? ? obj.style.backgroundColor("#f2f2f2");? ? ? }? ? ? obj.onmouseout=function(){? ? ? obj.style.backgroundColor("#fff");? ? ? }} ?不知道代碼哪里有問(wèn)題,在Chrome中審查元素說(shuō)obj.style.backgroundColor is not a function
表格無(wú)法變色
慕粉3332817
2016-05-23 15:31:22