<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title>鼠标经过给tr换颜色</title>
<script type="text/javascript">
function changeTrColor(obj){
var _table=obj.parentNode;
for (var i=0;i<_table.rows.length;i++){
_table.rows[i].style.backgroundColor="";
}
obj.style.backgroundColor="blue";
}
</script> </head>
<body>
<table align="center" width="100%" border="1" cellspacing="1" cellpadding="1" >
<tr style="cursor:pointer;" onmousemove="changeTrColor(this)">
<td align="center">1</td>
<td height="20"> 123</td>
<td height="20"> abvx</td>
<td height="20"> 465465</td>
<td height="20">546654654</td>
</tr>
<tr style="cursor:pointer;" onmousemove="changeTrColor(this)">
<td align="center">1</td>
<td height="20"> 123</td>
<td height="20"> abvx</td>
<td height="20"> 465465</td>
<td height="20">546654654</td>
</tr>
<tr style="cursor:pointer;" onmousemove="changeTrColor(this)">
<td align="center">1</td>
<td height="20"> 123</td>
<td height="20"> abvx</td>
<td height="20"> 465465</td>
<td height="20">546654654</td>
</tr>
</table>
</body>
</html>

table tr列 鼠标经过时更改背景颜色的更多相关文章

  1. wpf dataGrid 选中行 失去焦点时 的背景颜色的更改

    关于 wpf dataGrid 选中行 失去焦点时 的背景颜色的更改.很简单的方式,在datagrid的resource中更改InactiveSelectionHighlightBrushKey属性的 ...

  2. NotePad++更改背景颜色

    白色的编辑框看得眼睛不舒服,怎么样更改NotePad++的背景颜色使眼睛更舒服些? 1.设置--语言格式设置 2.设置背景色 “背景色”一栏,选择背景色颜色   “使用全局背景色”一栏要打上√,否则无 ...

  3. 1016-06-首页20-封装工具条---UITableView控件距离顶部的间距问题----cell选中时的背景颜色设置

    一.设置UITableView里面的顶部 cell 距离顶部的间距的三种方式: 方法 1. 直接设置: self.tableView.contentInset = UIEdgeInsetsMake(H ...

  4. CSS实例:鼠标滑过超级链接文字时改变背景颜色

    先讲简单的: 通过CSS可以设置超链接在不同时刻的颜色: <style> a:link {color: #FF0000} /* 未访问的链接 */ a:visited {color: #0 ...

  5. java 24 - 5 GUI之 鼠标移动改变窗体背景颜色

    需求: 创建一个可改变背景颜色的窗口,鼠标移动到按钮上,窗口背景就会改变成特定的颜色 步骤: (大致上) 创建窗口对象 创建按钮对象 添加按钮到窗口中 设置窗口关闭监听事件 设置鼠标进入按钮区域的监听 ...

  6. Java基础 awt Button 鼠标放在按钮上背景颜色改变,鼠标离开背景颜色恢复

        JDK :OpenJDK-11      OS :CentOS 7.6.1810      IDE :Eclipse 2019‑03 typesetting :Markdown   code ...

  7. 取消a标签在移动端点击时的背景颜色

    一.取消a标签在移动端点击时的蓝色 -webkit-tap-highlight-color: rgba(255, 255, 255, 0); -webkit-user-select: none; -m ...

  8. 取消a标签或者onclick在移动端点击时的背景颜色

    一.取消a标签在移动端点击时的蓝色 -webkit-tap-highlight-color: rgba(, , , ); -webkit-user-select: none; -moz-user-fo ...

  9. Android中的ListView点击时的背景颜色设置

    想设置listview中每行在点击.选中等不同状态下有不同的背景颜色,或者背景图片. 这可以用Android的Selector来实现.它可以定义组件在不同状态下的显示方式. 新建一个xml文件list ...

随机推荐

  1. Mysqlde的权限操作,以及增加用户

    增加用户及直接授权 ' 在这条命令里边all代表所有的权限,*.*代表所有的空间名.表名 sql的通配符 _ 代表任意的一个字符 % 代表任意的字符的任意长度 修改用户的密码 update 空间名.表 ...

  2. tsl/ssl 证书制作记录

    生成自签名证书 生成服务端秘钥 $ openssl genrsa -out server.key 1024 生成证书请求文件 编写配置文件openssl.cnf $ vi openssl.cnf [r ...

  3. 使用 create-react-app 构建 react应用程序

    原文 http://blog.csdn.net/github_squad/article/details/57452333#

  4. dubbo 之filter使用

    1.继承接口com.alibaba.dubbo.rpc.Filter实现public Result invoke(Invoker<?> invoker, Invocation invoca ...

  5. 如何规划和选择数据库服务器:CPU、内存、磁盘、网络(转)

    转自:http://blog.chinaunix.net/uid-5715-id-2734517.html 学习如何根据业务模型来计算tpcc值,挺有帮助的. 当一个新的业务系统开发完成后,需要在一个 ...

  6. Visual studio 生成后事件说明

      在“配置属性->生成事件->生成后事件”属性页中的“命令行”编辑框中输入如下命令: copy "$(ProjectDir)$(IntDir)\$(ProjectName).t ...

  7. 脚本操作zk

    使用[root@localhost bin]# ./zkCli.sh连接本地zk 创建 create [-s] [-e] path data acl 其中,-s是创建顺序或临时结点.默认情况下,不添加 ...

  8. Leetcode 429. N-ary Tree Level Order Traversal

    bfs class Solution: def levelOrder(self, root: 'Node') -> List[List[int]]: q,ans=[root],[] while ...

  9. LNMP架构基础搭建

    LNMP架构+wordpress博客 环境: centos6.7 2.6.32-573.el6.x86_64 nginx-1.6.3 mysql-5.5.49 php-5.3.27 wordpress ...

  10. PHP简单实例

    <?php /** * @author admin * @copyright 2016 *编程实现2+4+6+…+100. * $sum = 0; for($i=2;$i<=100;$i+ ...