<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>鼠标滑过效果</title>

<script src="~/Scripts/jquery-1.10.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {

$("#orderedlist tbody tr").css({"text-align":"center"});
$("#orderedlist tbody tr").hover(function() {
$(this).addClass("blue");

}, function() {
$(this).removeClass("blue");
}).click(function ( ) {
// alert($(this).children("td").eq(0).attr("id"));//获取td
alert($(this).children("td").eq(1).text());//获取td
});
});
</script>
<style>
.blue {
background: #bcd4ec;
cursor: pointer;
}
</style>
</head>
<body>
<table id="orderedlist" width="50%" border="0" cellspacing="0" cellpadding="0">
<thead id="th1">
<tr>
<th>姓名</th>
<th>年龄</th>
<th>QQ</th>
<th>Email</th>
</tr>
</thead>
<tbody id="tb1">
<tr>
<td id="tid1">AAAA</td>
<td id="num1">20</td>
<td>1111</td>
<td>aaaa@gmail.com</td>
</tr>
<tr>
<td id="tid2">BBBB</td>
<td id="num2">21</td>
<td>2222</td>
<td>bbbb@gmail.com</td>
</tr>
<tr>
<td id="tid3">CCCC</td>
<td id="num3">22</td>
<td>333</td>
<td>cccc@gmail.com</td>
</tr>
</tbody>
</table>
</body>
</html>

最新文章

  1. Xamarin.ios 重新定位视图
  2. 封装对NPOIExcel的操作,方便的设置导出Excel的样式
  3. Java 继承 执行顺序
  4. string字符串类型
  5. Linux学习笔记(5)-进程管理
  6. 将表单数据转化为json数据
  7. NSString属性什么时候用copy,什么时候用strong?【转】
  8. inheritprototype原型继承封装及综合继承最简实例
  9. AI人工智能-Python实现人机对话
  10. 【Android 应用开发】Android应用的自动更新模块
  11. 【译】图解Transformer
  12. spring boot整合servlet、filter、Listener等组件方式
  13. Datatable的操作方法
  14. C语言拼接字符串 -- 使用strcat()函数
  15. JS执行机制--事件循环--笔记
  16. centos 7 安装 BeautifulSoup 和requests
  17. Mybatis的分页插件PageHelp:Page对象中的pageSize等属性无法序列化,无法转换为json字符串
  18. bzoj1074
  19. 在vue项目中添加eslint规则
  20. Python菜鸟之路:Python基础-线程、进程、协程

热门文章

  1. wkhtmltopdf乱码解决方案
  2. C#功能杂集
  3. stanford NLP学习笔记3:最小编辑距离(Minimum Edit Distance)
  4. super getClass()
  5. win7、linux安装使用pip、mitmproxy
  6. Unity3D优化总结
  7. scichart by Kline
  8. oracleclient连oracle库 报System.Data.OracleClient 需要 Oracle 客户端软件 8.1.7 或更高版本
  9. 转@OneToMany或@ManyToOne的用法-annotation关系映射篇(上)
  10. linux中的进程和线程