GridView里面行光带随鼠标移动

 protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
    if (e.Row.RowType == DataControlRowType.DataRow)
    {
        e.Row.Attributes.Add("OnMouseOut", "this.style.backgroundColor=e;");
        e.Row.Attributes.Add("OnMouseOver", "e=this.style.backgroundColor;this.style.backgroundColor='#5CCCCC'");
        e.Row.Attributes["style"] = "Cursor:hand";
    }
}

你可能感兴趣的:(object)