jquery设置cursor的属性改变光标的类型(形状)
第一种:通过增加Class$("td").hover(function () {$(this).addClass("hover");},function () {$(this).removeClass("hover");});第二种:通过直接设置Style$('td').hover(function() {this.style.cursor = 'pointer';...
·
第一种:通过增加Class
css代码:
.hover{
cursor:pointer;
}
js代码
$("td").hover(
function () {
$(this).addClass("hover");
},
function () {
$(this).removeClass("hover");
}
);
第二种:通过直接设置Style
$('td').hover(
function() {
this.style.cursor = 'pointer';
}
);
更多推荐


所有评论(0)