当前位置:编程学习 > C#/ASP.NET >>

asp.net下让Gridview鼠标滑过光棒变色效果

答案:
复制代码 代码如下:

//光棒效果
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "currentcolor=this.style.backgroundColor;this.style.backgroundColor='#FFFDD7'");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=currentcolor");
}
}

上一个:ASP.NET中的无刷新验证码的开发(完整代码)
下一个:asp.net使用母版页中使用ajax脚本取数据

CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,