日期:2014-05-17 浏览次数:20483 次
protected void gv_RowDataBound(object sender, GridViewRowEventArgs e) { //首先判断是否是数据行 if (e.Row.RowType == DataControlRowType.DataRow) { //当鼠标停留时更改背景色 e.Row.Attributes.Add("onMouseMove", "this.style.backgroundColor='#e2e6e9';"); //当鼠标移开时还原背景色 e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#f4f9fc';"); } }