阅读背景:

表格中,鼠标放上去的行变色,离开恢复原来颜色

来源:互联网 

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");
    });
});/*
表格中,鼠标放上去的行变色
使用  
<tbody id="tdat



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: