|
楼主 |
发表于 2020-2-16 18:30:02
|
显示全部楼层
才看见这么多人给我回贴啊,谢谢了,解决是解决了背景色变化,但是前景色还是不变,帮我看看代码哪里错了,这回改过来马上给分啊!
protected void gridview2_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("OnMouseOut", "this.style.backgroundColor='White';this.style.color='#003399'");
e.Row.Attributes.Add("OnMouseOver", "this.style.backgroundColor='#6699FF';this.style.color='#8C4510'");
}
} |
|