//给指定的td加title
function () {
//第2个到第3个
$("table td:nth-child(n+2):nth-child(-n+3)").each(function () {
$(this).attr("title", $(this).text());
});
//第6个到第29个
$("table td:nth-child(n+6):nth-child(-n+29)").each(function () {
$(this).attr("title", $(this).text());
});
}
nth-child 用法
最新推荐文章于 2023-06-30 17:24:14 发布