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

2025年02月12日 07:59
有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");
    });
});