asp.net下让Gridview鼠标滑过光棒变色效果
程序员文章站
2024-03-07 13:21:57
复制代码 代码如下://光棒效果 protected void gridview1_rowdatabound(object sender, gridviewrowevent...
复制代码 代码如下:
//光棒效果
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");
}
}
上一篇: Linux:从远程服务器传输至本地