ASP.NET2.0下为GridView添加鼠标滑过(onmouseover、onmouseout)的行颜色高亮效果!(2) } //单击行改变行背景颜色 if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Attributes.Add("onclick","this.style.backgroundColor='#99cc00'; this.style.color='buttontext';this.style.cursor='default';"); }