表格中,鼠标放上去的行变色,离开恢复原来颜色
2014-08-14 19:44 -夜 阅读(621) 评论(0) 编辑 收藏 举报JS代码
/* 表格中,鼠标放上去的行变色 使用 <tbody id="tdata"> ......... </tbody> */ $(function () { var tr = $("#tdata tr"); tr.mouseover(function () { $(this).css("background-color", "#AEF2E5"); $(this).children("td").css("background-color", "#AEF2E5"); }).mouseout(function () { $(this).css("background-color", "#FFFFFF"); $(this).children("td").css("background-color", "#FFFFFF"); }); });
版权声明:本文为博主原创文章,未经博主允许不得转载。