惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
Google Developers Blog
博客园 - 司徒正美
Last Week in AI
Last Week in AI
Recent Announcements
Recent Announcements
Y
Y Combinator Blog
博客园 - 聂微东
M
MIT News - Artificial intelligence
博客园_首页
Jina AI
Jina AI
博客园 - 叶小钗
酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hackread – Cybersecurity News, Data Breaches, AI and More
J
Java Code Geeks
F
Fortinet All Blogs
aimingoo的专栏
aimingoo的专栏
小众软件
小众软件
Vercel News
Vercel News
The Cloudflare Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
云风的 BLOG
云风的 BLOG
N
Netflix TechBlog - Medium
B
Blog
Google DeepMind News
Google DeepMind News
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - Eric.Wang

jQuery的.bind()、.live()和.delegate()之间区别 [转][探讨]为什么说JavaScript是性价比最高的技术? [转载]C# 中的委托和事件 常见兼容性问题及解决方案 浅析JavaScript继承方式 深入理解js闭包 一些常用且实用的原生 JavaScript函数 兼容IE和FF的js脚本做法(比较常用) CSS的盒子模型(Box Model) jQuery使用技巧 区分IE6,IE7,firefox三种浏览器的CSS HACK CSS基础学习 IE与Firefox对CSS的解析差异 关于JavaScript中apply与call的用法意义及区别 JS调用后台方法大全 Aptana配置说明 Asp.Net收集 VS2005打开js文件,中文都是乱码 检测远程URL是否存在的三种方法 - Eric.Wang - 博客园
鼠标停留在GridView某行的颜色改变 - Eric.Wang - 博客园
Eric.Wang · 2008-06-04 · via 博客园 - Eric.Wang

1、protected void gvdegreetype_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='GhostWhite'");
            e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='white'");
        }
    }

2、 protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
 //当鼠标移到的时候设置该行颜色为"", 并保存原来的背景颜色
 e.Row.Attributes.Add("onmouseover", "currentcolor=this.style.backgroundColor;this.style.backgroundColor='#6699CC'");
 //当鼠标移走时还原该行的背景色
 e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=currentcolor");
}