<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. 初次安装git配置用户名和邮箱及密钥

    在Windows上安装Git: 在Windows上使用Git,可以从Git官网直接下载安装程序,(网速慢的同学请移步国内镜像),然后按默认选项安装即可. 安装完成后 键盘敲上:windows+r你会看 ...

  2. css去掉input记住密码的黄色

    input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autof ...

  3. 【zznu-2173】

    题目链接 题目描述 春天自幼学习人间大道,斩断情缘,现已修成正果,势必要斩尽巨魔.某朝末年,战乱四起,民不聊生,魔界与人间界的封印减弱,n只巨魔趁机降临人间,祸乱百姓.n只巨魔只知扰乱人间,会有天谴降 ...

  4. 【zznu-夏季队内积分赛3-F】学无止境

    题目描述 “别人总说我瓜,其实我一点也不瓜,大多数时候我都机智的一批“ACM程序设计竞赛是一个团体项目.宝儿姐作为其中优秀的一份子,每天好好学习天天向上.曾经宝儿姐给自己定了一个计划,刷穿bzoj.于 ...

  5. bzoj3495

    题解: 对于每一条边的两段都有,很简单 然后处理国家 容易发现前缀和为1 代码: #include<cstdio> #include<algorithm> using name ...

  6. git重要命令

    body, table{font-family: 微软雅黑; font-size: 13.5pt} table{border-collapse: collapse; border: solid gra ...

  7. webpack 事件触发 按需加载

    比较易懂, 方法简单 var util_sync = require('./util-sync.js') alert(util_sync.data) document.getElementById(& ...

  8. Android 屏幕密度适配

    Android Icon Size and Location for Apps   分辨率 DPI Density scale 1dp对应像素 1dp对应物理尺寸 Location Icon Size ...

  9. 初识jQuery(2)

    1.DOM模型 1.1以对象描述文档的方式就是DOM 节点对象就是被称为DOM对象(标签对象) 1.2节点 元素节点(标签) 文本节点(标签内容) 属性节点(标签属性) 2.Jquery语法结构 $( ...

  10. flowable 五个引擎和组成引擎的服务

    一.flowable的五个引擎 flowable包含五个引擎,分别是: 1.内容引擎 ContentEngine 2.身份识别引擎 IdmEngine 3.表单引擎 FormEngine 4.决策引擎 ...