表格中,鼠标放上去的行变色,离开恢复原来颜色
2014-08-14 19:44 -夜 阅读(674) 评论(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");
});
});版权声明:本文为博主原创文章,未经博主允许不得转载。
浙公网安备 33010602011771号