鼠标划过grdAutomobile的背景色效果
来源:互联网 发布:苹果cms精仿模板 编辑:程序博客网 时间:2024/04/28 18:10
//鼠标划过grdAutomobile的背景色
protected void grdAutomobile_RowDataBound(object sender, GridViewRowEventArgs e)
{
for (int i = -1; i < grdAutomobile.Rows.Count; i++)
{
//首先判断是否是数据行
if (e.Row.RowType == DataControlRowType.DataRow)
{
//当鼠标停留时更改背景色
e.Row.Attributes.Add("onmouseover", "c=this.style.backgroundColor;this.style.backgroundColor='#d1d7da'");
//当鼠标移开时还原背景色
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=c");
}
}
}
protected void grdAutomobile_RowDataBound(object sender, GridViewRowEventArgs e)
{
for (int i = -1; i < grdAutomobile.Rows.Count; i++)
{
//首先判断是否是数据行
if (e.Row.RowType == DataControlRowType.DataRow)
{
//当鼠标停留时更改背景色
e.Row.Attributes.Add("onmouseover", "c=this.style.backgroundColor;this.style.backgroundColor='#d1d7da'");
//当鼠标移开时还原背景色
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=c");
}
}
}
- 鼠标划过grdAutomobile的背景色效果
- GridView的小技巧(1)--如何实现鼠标划过改变GridView的行背景色
- 用javascript实现GridView行背景色交替鼠标划过行变色点击行变色选中
- 使用js实现鼠标移入移出时背景色的切换效果
- 鼠标移至表格行时背景色切换效果【代码片段】
- 用javascript/css实现GridView行背景色交替、鼠标划过行变色,点击行变色选中
- asp.net 鼠标划过的高亮效果
- Extjs 中鼠标划过悬浮效果的显示
- 鼠标划过的动态效果,JQUERY:display:none
- 根据不同条件设置ITEM的背景色和鼠标移动时的背景色
- 鼠标悬停,背景色渐变
- 滑动鼠标改变背景色
- Jquery 菜单点击,划过换背景色代码
- 鼠标经过Tabel的tr tr的背景色变换
- 随着鼠标的移动变换表格背景色
- 鼠标移到GridView某一行时改变该行的背景色
- 鼠标经过时,改变div块的背景色
- 鼠标移到GridView某一行时改变该行的背景色
- 基于阵列的数据精简技术
- 多校(HDU 7月12日 1009 Equivalent Sets 强连通分支 )
- CPaint、CClientDC、CWindowDC以及CDC的区别
- Spring+Hibernate+Struts2整合文档
- 静态dll
- 鼠标划过grdAutomobile的背景色效果
- Spring+Hibernate+Struts2整合文档(二)
- 网络拓扑结构5-3-1读取数据库并训练预测
- 快速排序算法
- struts2的标签在哪里?
- C++箴言:理解inline化的介入和排除
- .net 自定义控件显示及传参
- Apache开源项目Log4cxx学习
- 动态dll