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
"
;
}
查看全文
相关阅读:
Linux入门
服务器核心知识
跨域
DRF的解析器和渲染器
DRF的分页
DRF 权限 频率
DRF 版本 认证
Django Rest Framework 视图和路由
Serializers 序列化组件
六、Java NIO 通道之间的数据传输
原文地址:https://www.cnblogs.com/cnaspnet/p/1242230.html
最新文章
linux_无秘登录问题(不生效)
maven_默认新建项目jdk1.6_默认配置
php_Ubuntu Linux下为PHP5安装cURL,mysql
bigdata_spark_源码修改_本地环境搭建_eclise
idea_intellij
smb_精简安装
bigdata_hive_Issue of Vectorization on Parquet table
bigdata_hadoop_namenode手动重启错误解决分析
bigdata_hadoop集群配置_内存分配
正则表达式
热门文章
at、crontab、anacron的基本使用
linux系统资源查看常用命令
区块链详解
cookie和session(转)
python的Requests库的使用
Linux的curl和wget
Linux软件包安装
Linux三个比较特殊的权限
小记(重载,重写,多态)
VMware与Centos系统安装、重置root密码
Copyright © 2011-2022 走看看