服务器之家:专注于服务器技术及软件下载分享
分类导航

PHP教程|ASP.NET教程|JAVA教程|ASP教程|

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

2019-09-07 15:41脚本之家 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"); 

}

延伸 · 阅读

精彩推荐