1    protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
 2    {
 3        e.Row.Attributes.Add("onmouseover""c=this.style.backgroundColor;this.style.backgroundColor='#FFC0C0'");
 4        e.Row.Attributes.Add("onmouseout""this.style.backgroundColor=c");
 5        //注意,这里是backgroundColor, 不要写成 backcolor 和 backgroudcolor(注意大小写)
 6        //e.Row.Attributes.Add("onmouseover", "c=this.style.backgroundColor;this.style.backgroundColor='#FFC0C0'");
 7        //e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=c;");
 8
 9    }

10
posted on 2006-12-09 16:51  努力建设我的管道!  阅读(218)  评论(0编辑  收藏  举报