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
"
;
}
查看全文
相关阅读:
Mysql Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disable safe mode
vs2012+ winform+.net4.0发布如何在xp上运行
ubuntu下手动配置apache2.4.12
mysql连接错误解决(ERROR 2049 (HY000): Connection using old (pre-4.1.1) authentication protocol ref used (client option 'secure_auth' enabled))
位运算取绝对值
位运算两数交换
java mysql prepareStatement模糊查询like使用注意
idea14远程调试linux下的tomcat
web视频播放插件:Video For Everybody
cmd杀死进程
原文地址:https://www.cnblogs.com/cnaspnet/p/1242230.html
最新文章
弹窗提示
小程序内置基本语法
绑定css样式,点击高亮
vue-cli3
css高度居中
多出的文字成省略号...
忘记密码(通过手机验证码找回设置)自己写
登录记住密码自己写
vue 登录 + 记住密码 + 密码加密解密
通过手机发送短信验证码注册
热门文章
Springboot-技术专区-war包部署在Tomcat上并修改默认端口
HTTP报文头Accept和Content-Type总结
Mybatis-技术专区-中的条件查询createCriteria example里面的条件
如何优雅关闭 Spring Boot 应用
Mybatis-技术专区-Mapper接口以及Example的实例函数及详解
SpringBoot-技术专区-详细打印启动时异常堆栈信息
消息中间件-技术专区-RocketMQ架构原理
APM-全链路追踪
微服务-技术专区-监控对比分析
微服务-技术专区-监控专区(Skywalking与Pinpoint)
Copyright © 2011-2022 走看看