반응형
1
2
3
4
5
6
7
8
9
10
fnDrawCallback: function () { 
    $('#tableId tbody tr').click(function () {  
        // get position of the selected row  
        var position = $('#tableId').dataTable().fnGetPosition(this)  
        // value of the first column (can be hidden)  
        var id = $('#tableId').dataTable().fnGetData(position).id
        // redirect
        document.location.href = 'abcd.html?id=' + id
    })
}
cs

 

반응형

+ Recent posts