if(e.Item.ItemType = ListItemType.Item)
{
e.Item.Attributes.Add("onmouseover", "this.style.backgroundColor='#FF5500'")
e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor='黑色'")}
if(e.Item.ItemType = ListItemType.AlternatingItem)
{
e.Item.Attributes.Add("onmouseover", "this.style.backgroundColor='#FF5500'")
e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor='白色'")}
分别设置就可以了,我是C#,VB类似的!
{
e.Item.Attributes.Add("onmouseover", "this.style.backgroundColor='#FF5500'")
e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor='黑色'")}
if(e.Item.ItemType = ListItemType.AlternatingItem)
{
e.Item.Attributes.Add("onmouseover", "this.style.backgroundColor='#FF5500'")
e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor='白色'")}
分别设置就可以了,我是C#,VB类似的!
If e.Item.ItemType = ListItemType.Item Then
e.Item.Attributes.Add("onmouseover", "this.style.backgroundColor='#FF5500'")
e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor='#FFFFFF'")
Else If e.Item.ItemType = ListItemType.AlternatingItem
e.Item.Attributes.Add("onmouseover", "this.style.backgroundColor='#FF5500'")
e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor='#AAAAAA'")
End If
If e.Item.ItemType = ListItemType.Item Then
e.Item.Attributes.Add("onmouseover", "this.style.backgroundColor='#FF5500'")
e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor='#FFFFFF'")
Else If e.Item.ItemType = ListItemType.AlternatingItem
e.Item.Attributes.Add("onmouseover", "this.style.backgroundColor='#FF5500'")
e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor='#AAAAAA'")
End If