【隔行换色,鼠标移入高亮】

需要将table的id为mytable

<style type="text/css">
tr.even td{background:#eee;}
tr.over td{background:#999}
#mytable tr {
 background-color: #fff;
}
</style>
<script type="text/javascript">
$(document).ready(function(){
 $("#mytable tr").mouseover(function() {
   $(this).addClass("over");
  }).mouseout(function() {
   $(this).removeClass("over");
  });
 $("#mytable tr:even").addClass("even");
});
 
</script>

posted on 2009-05-20 15:09 bestmost 阅读(557) 评论(0)  编辑 收藏 引用 网摘 所属分类: js


只有注册用户登录后才能发表评论, 未注册用户请先注册

网站导航:
<2009年5月>
262728293012
3456789
10111213141516
17181920212223
24252627282930
31123456

导航

统计

公告

留言簿(6)

随笔分类(322)

all

搜索

积分与排名

最新评论

阅读排行榜

千百亿工作室
BT促销网