表格单元格增加hover事件
来源:互联网 发布:唯一网络怎么样 编辑:程序博客网 时间:2024/05/29 09:15
<!DOCTYPE HTML>
<html>
<head>
<meta charset=UTF-8 />
<script type="text/javascript" src="js/jquery-2.1.0.js"></script>
<script>
$(function() {
// $(document).on('mouseenter', '#msgTable001 tr .flag', function() {
// console.log("2222 : ");
// });
//
// $(document).on('mouseleave','#msgTable001 tr .flag',function(){
// console.log("4444 : ");
// });
$("#msgTable001 tr .flag").on('mouseenter', function() {
console.log("222233 : ");
});
$("#msgTable001 tr .flag").on('mouseleave',function(){
console.log("444455 : ");
});
});
</script>
</head>
<body>
<table id="msgTable001" border="1">
<tr>
<th>姓名</th>
<th>电话</th>
<th>电话</th>
</tr>
<tr>
<td>Bill Gates</td>
<td class="flag">555 77 854</td>
<td>555 77 855</td>
</tr>
</table>
</table>
</body>
</html>
<html>
<head>
<meta charset=UTF-8 />
<script type="text/javascript" src="js/jquery-2.1.0.js"></script>
<script>
$(function() {
// $(document).on('mouseenter', '#msgTable001 tr .flag', function() {
// console.log("2222 : ");
// });
//
// $(document).on('mouseleave','#msgTable001 tr .flag',function(){
// console.log("4444 : ");
// });
$("#msgTable001 tr .flag").on('mouseenter', function() {
console.log("222233 : ");
});
$("#msgTable001 tr .flag").on('mouseleave',function(){
console.log("444455 : ");
});
});
</script>
</head>
<body>
<table id="msgTable001" border="1">
<tr>
<th>姓名</th>
<th>电话</th>
<th>电话</th>
</tr>
<tr>
<td>Bill Gates</td>
<td class="flag">555 77 854</td>
<td>555 77 855</td>
</tr>
</table>
</table>
</body>
</html>
阅读全文
0 0
- 表格单元格增加hover事件
- 动态添加表格(增加事件)
- DataGridView单元格增加按钮,单击事件
- easyui-datagrid 单元格增加双击事件
- hover事件
- javascript动态创建表格:增加、删除行/单元格
- 如何在KDTable中的单元格编辑增加事件监听器?
- 表格动态加,删除行 单元格元素添加点击事件
- js鼠标事件切换表格单元格背景色
- jQuery hover事件 使用jquery实现表格的隔行换色功能
- jquery hover()事件函数
- JQuery事件之hover
- jQuery hover事件
- Raphael hover事件使用
- jQuery hover事件
- jQuery hover事件
- Jquery---hover事件
- js实现hover事件
- 聊聊make/makefile的本质------顺便说说如何使用make/makefile批量地把.cpp文件改成.txt文件
- Activity退出应用程序
- 使用原生JS的AJAX读取json全过程
- java IO
- 计算机图形学基础(2)——画圆,椭圆算法
- 表格单元格增加hover事件
- 将Nginx加入service服务中
- ViewPager 实现自动循环轮播 高度自适应 显示前后部分界面 点击事件
- java多线程笔记(1)
- 《软件工程》课程总结
- Android实现第三方登录
- C++虚函数表解析
- VS修改平台工具集
- 为什么C语言中使用的地址是假的