单击从数据表表

时间:2017-07-08 19:18:12

标签: javascript jquery

在导出为csv按钮时单击我使用此选项,需要对所选行使用什么功能  HTML -

<div class="col-md-12" style="margin-top:-30px;">
       <table class="cell-border didntfill_form_table" style="min-height: 100px;width:100%;"></table>
    </div>

$("#csv").on('click', function(){
$('.didntfill_form_table').tableExport({ type: 'csv', escape: 'false' });
});

JS -

var columns = [
            { "data": "id","title":"Teacher's Id","visible":true},
            { "data": "name","title":"Name","orderable":true, 'className':'dt-body-left'},
            { "data": "gender","title":"Gender","orderable":false, 'className':'dt-body-left'},
            { "data": "mobileno","title":"Mobile No","orderable":false, 'className':'dt-body-left'},
            { "data": "schoolname","title":"School Name","orderable":false, 'className':'dt-body-left'},
            { "title":"<input type='checkbox' class='dnt_fill_form_ttl' style='width: 18px;height: 18px;'>","orderable":false, 'className':'dt-body-center',"width":'10px',
                "render" : function(data, type, row, meta){
                    return  '<input type="checkbox" class="dnt_fill_form_row" style="width: 18px;height: 14px;">';
                }
            }

            ];

0 个答案:

没有答案