GridView控件的光棒效应

1 // 光棒效应
2         protected void gvBookInfos_RowDataBound(object sender, GridViewRowEventArgs e)
3         {
4             if(e.Row.RowType==DataControlRowType.DataRow)
5             {
6                 e.Row.Attributes.Add("onmouseover", "currentColor=this.style.backgroundColor;this.style.backgroundColor='yellow'");
7                 e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=currentColor");
8             }
9         }

 

posted @ 2015-08-13 20:39  谢码  阅读(231)  评论(0编辑  收藏  举报