第一种:通过增加Class

css代码:

.hover{
    cursor:pointer;
}

js代码 

$("td").hover( 
    function () { 
        $(this).addClass("hover"); 
    },
    function () { 
        $(this).removeClass("hover"); 
    } 
);  

第二种:通过直接设置Style

$('td').hover(
    function() {
         this.style.cursor = 'pointer';
    }
);  

Logo

汇聚全球AI编程工具,助力开发者即刻编程。

更多推荐