zoukankan
html css js c++ java
GridView移动行变色
1.
protected
void
myGridView_RowDataBound(
object
sender, GridViewRowEventArgs e)
{
//
if (e.Row.RowType == DataControlRowType.Header)
//
{
//
e.Row.Attributes.Add("style", "background-image:url('./HeadImages/headeImage.jpg')");
//
}
if
(e.Row.RowType
==
DataControlRowType.DataRow)
{
//
e.Row.Attributes["onmouseover"] = "ItemOver(this)";
e.Row.Attributes.Add(
"
onmouseover
"
,
"
e=this.style.backgroundColor; this.style.backgroundColor='#EEEEEE'
"
);
e.Row.Attributes.Add(
"
onmouseout
"
,
"
this.style.backgroundColor=e
"
);
}
}
2.
e.Row.Attributes[
"
onmouseover
"
]
=
"
ItemOver(this)
"
;
if
(
!
objbeforeItem)
{
var
objbeforeItem
=
null
;
var
objbeforeItembackgroundColor
=
null
;
}
function
ItemOver(obj)
{
if
(objbeforeItem)
{
objbeforeItem.style.backgroundColor
=
objbeforeItembackgroundColor;
}
objbeforeItembackgroundColor
=
obj.style.backgroundColor;
objbeforeItem
=
obj;
obj.style.backgroundColor
=
"
#B9D1F3
"
;
}
查看全文
相关阅读:
POJ2965(The Pilots Brothers' refrigerator)
POJ1753(Flip Game)
POJ3253(Fence Repair)
山东理工大学的训练计划
loutsScript 常用代码
《大道至简》读后感
2019暑第三周
2019暑第二周
2019暑第一周
关于13组作品《TD tree》的使用感想
原文地址:https://www.cnblogs.com/cnaspnet/p/1242230.html
最新文章
按钮加载事件
浮标
window对象(bom)的常用事件和方法 属性(reload replace) 字符串(string)与数组(Array)之间的转化 及字符串方法
js原型 (继承性)
页面传值的方法 和JSON与字符串和对象之间的转换
**替换敏感词
获取网页的宽高
onsubmit事件
页面中需要用到的符号
构造矩阵解决线性递推问题
热门文章
组合数学
置换群的快速幂运算
数论之大素数检测与大整数分解(10^18)
01分数规划
SRM593(1-250pt,500pt)
高斯消元问题
SRM475
矩阵和线性方程组
Topcoder 好题推荐
HDU2209 ( 翻纸牌游戏 )
Copyright © 2011-2022 走看看