dataTable 点击行弹窗
来源:互联网 发布:论坛抢沙发软件 编辑:程序博客网 时间:2024/06/03 07:40
QuestionJobCodedataTables = $('#datatable').DataTable({ "createdRow": function(row, data, index) { $(this, row).attr('data-toggle', 'modal').attr('data-target', '.bs-example-modal-sm1'); }, "bSort": false, ajax: { type: 'POST', url: '/reportyJobInfo/getErrorJobInfo', async: false, dataSrc: "", data: function(data) { var getquestionJobCodeTime = document.getElementById("getTimesQuestionJobCode").innerHTML; var t0 = getquestionJobCodeTime.substring(0, 19); var t1 = getquestionJobCodeTime.substring(22); data.t0 = t0, data.t1 = t1 } }, columnDefs: [ { targets: 0, width: '15%', data: [0] }, { targets: 1, width: '65%', data: [1] }, { targets: 2, width: '20%', data: [2] }, ], language: { "sProcessing": $.i18n.prop('处理中...'), "sLengthMenu": $.i18n.prop('显示 _MENU_ 台结果'), "sZeroRecords":$.i18n.prop('没有匹配结果'), "sInfo":$.i18n.prop('显示第 _START_ 至 _END_ 台,共 _TOTAL_ 台'), "sInfoEmpty": $.i18n.prop('显示第 0 至 0 台结果,共 0 台'), "sInfoFiltered":$.i18n.prop('(由 _MAX_ 台结果过滤)'), "sInfoPostFix": "", "sSearch": $.i18n.prop('查询'), "sUrl": "", "sEmptyTable":$.i18n.prop('数据为空'), "sLoadingRecords":$.i18n.prop('载入中...'), "sInfoThousands": ",", "oPaginate": { "sFirst":$.i18n.prop('首页'), "sPrevious":$.i18n.prop('上页'), "sNext":$.i18n.prop('下页'), "sLast":$.i18n.prop('末页') }, "oAria": { "sSortAscending":$.i18n.prop('以升序排列此列'), "sSortDescending":$.i18n.prop('以降序排列此列') } } }); });
$('#datatable tbody').on('click', 'tr',function() { var data = QuestionJobCodedataTables.row(this).data(); alert(data[2]) });
<table class="table" id="datatable"> <thead> <tr class="headings"> <th class="column-title"> <label data-locale="i18n_jobCode"></label> </th> <th class="column-title"> <label data-locale="i18n_question"></label> </th> <th class="column-title"> <label data-locale="i18n_remark"></label> </th> </tr> </thead> <tbody id="table22"> </tbody> </table>
阅读全文
0 0
- dataTable 点击行弹窗
- 按钮点击事件更改dataTable Ajax源
- jquery datatable 取当前点击列的配置
- DataTable第二页后的点击事件无效
- DataTable异步获取 实现行点击并跳转
- DataTable
- DataTable
- DataTable
- DataTable
- datatable
- DataTable
- DataTable
- DataTable
- DataTable
- datatable???
- DataTable
- dataTable
- DataTable
- java SSM框架中使用aspose-words导出数据
- 安装并测试memcached
- 省选模拟赛[HEOI2012] Day2
- equals()和==的区别?
- Spring @Scheduled 定时任务
- dataTable 点击行弹窗
- JS中const、var、let的区别
- SQL中的DateAdd 、DateDiff 函数实现日期加减
- java 对redis 基本操作
- EXCEL实现回归分析
- linux系统中如何查看日志 (常用命令)
- 使用(jquery) 实现select 对option 的动态选中
- 电脑pc、移动端、平板不同客户端,调用不同页面或者样式
- Hive的分区,分组和分桶的详解和区别