js 实现 datagrid 鼠标移动时datagrid 表的该变

private void DataGridLogininfo_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e) 
  

   ListItemType itemType 
= e.Item.ItemType; 
   
if (itemType == ListItemType.Item ) 
   

     
    e.Item.Attributes[
"onmouseout"= "javascript:this.style.backgroundColor='#dedfde';"
    e.Item.Attributes[
"onmouseover"= "javascript:this.style.backgroundColor='#fff7ce';cursor='hand';" ; 

   }
 
   
else if( itemType == ListItemType.AlternatingItem) 
   

    e.Item.Attributes[
"onmouseout"= "javascript:this.style.backgroundColor='#ffffff';"
    e.Item.Attributes[
"onmouseover"= "javascript:this.style.backgroundColor='#fff7ce';cursor='hand';" ; 
   }
 
  }
 
原文地址:https://www.cnblogs.com/gwazy/p/111118.html