我尝试将用户重定向到另一个页面,但如果他/她单击表格中的 5、8 或最后一个单元格,则不会发生任何事情。第一排没问题。但其他行不起作用。
$("#table td:not(:last-child,:eq(5),:eq(8))").click(function(){
var url = $(this).parent().find('td:last-child a[title="edit"]').attr('href');
if (url != undefined) {
location.href = $(this).parent().find('td:last-child a[title="edit"]').attr('href');
}
});