
Code
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
//判断是否为数据行
{
e.Row.Attributes.Add("onmouseover", "c=this.style.backgroundColor;this.style.backgroundColor='#00ffee';");
//鼠标悬停 //把原来颜色赋给C,修改当前颜色为#00ffee
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=c;");
//鼠标离开 //改会原来颜色
}
}
posted on
2008-08-30 23:12
这里写什么?
阅读(
1771)
评论()
收藏
举报