jquery datatable插件,如何让选取一行,给它一个click事件

2025-02-12 07:59:36
推荐回答(2个)
回答1:


$(document).on("dblclick","#employee_list_table tbody tr",function() {

var index = $(this).context._DT_RowIndex; //行号

var nTds = $('td', this);

});

回答2:

$(function(){
    $("table tr").click(function(){
        alert("test");
    });
});