dataTables行渲染

发布时间:2020-07-05 10:08:33 作者:umigo0819
来源:网络 阅读:1114

    <script type="text/javascript">

$(document).ready(function(){

$('#example').DataTable( {

       "processing": true,

       "serverSide": true,

       'ajax': {

           url: 'servlet_test5',

           type: 'POST'

       },

       "columns": [

         

           { "data": "infoid", "className": "am-text-center"},

           { "data": "name" , "className": "am-text-center"},

           { "data": "gender" , "className": "am-text-center"},

           { "data": "age" , "className": "am-text-center"},

           { "data": "total_score", "className": "am-text-center"},

           { "data": "idcustomer" , "className": "am-text-center"},

           { "data": "infoid" , "className":"action", render: function ( data ) {

             return '<input type="button" class="contentSel" value="'+data.contentid+'">';

                                                  }},

       ],

    /*    "columnDefs": [{

        "render": function ( data, type, row ) {

         return '<input type="checkbox" class="contentSel" value="'+data.contentid+'">';

    },

    "targets":6   //第6-1=5列

       }], */

   } );

})

</script>


推荐阅读:
  1. dataTables实现鼠标拖动编辑行上下移动
  2. 了解DataTables

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

data tables amazeui

上一篇:用Go语言异常机制模拟TryCatch异常捕捉

下一篇:c# 的 元组Tuple

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》