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
"
;
}
查看全文
相关阅读:
vs2019编译错误:Exception Processing Message 0xc0000005 Parameters...
error LNK2001
Debug Assertion Failed
对路径“………………”的访问被拒绝
c语言打开文件为什么总是以二进制方式打开
关于typedef的用法总结
xml学习第一天
关于VS2017编译成功系统找不到指定文件.exe的问题
引入的外部js文件在html文件在浏览器中乱码显示
结对作业(四则运算)
原文地址:https://www.cnblogs.com/cnaspnet/p/1242230.html
最新文章
伤情最是晚凉天
帆软报表
如何将ppt模板的自动播放改为单击时播放
MySQL 8.0.12.0安装教程
一线架构师阅读笔记(三)
一线架构师阅读笔记(二)
一线架构师阅读笔记(一)
浅谈SOA
浅谈MVC架构设计模式
架构之美阅读笔记(三)
热门文章
架构之美阅读笔记(二)
JS 实现继承的几种方式
DOM盒模型系列之JavaScript
LeetCode.547 朋友圈
堆
用以致学,如何成为高品质的勤奋者(转载)
数据结构与算法习题---最小栈
在Linux上搭建私有git仓库
webpack插件之html-webpack-plugin
webpack中的图片打包之路
Copyright © 2011-2022 走看看