js实现高亮显示鼠标所在行

行:

<tr id="data_${stat.index}" class="main_trbg" align="center">

Js:

/** 给数据行绑定鼠标覆盖以及鼠标移开事件  */
$("tr[id^='data_']").hover(function(){
    $(this).css("backgroundColor","#eeccff");
},function(){
    $(this).css("backgroundColor","#ffffff");
})

猜你喜欢

转载自blog.csdn.net/qq_39056805/article/details/80393222