1、首先每个列都有一个title,里面放入完整信息,然后写一个如下的function,

1
2
3
4
5
6
7
8
function tdTitle(){
    $('th').each(function(index,element){
        $(element).attr('title',$(element).text());
    });
    $('td').each(function(index,element){
        $(element).attr('title',$(element).text());
    });
};

  2、在table数据渲染完的回调done中调用刚才写的function

1
2
3
4
5
6
7
8
9
10
table.render({
  cols:  [[ //标题栏
    {checkbox: true}
    ,{field: 'id', title: 'ID', width: 80}
    ,{field: 'username', title: '用户名', width: 120}
  ]]
  ,done:function(res){
        tdTitle();
    }
});

相关文章:

  • 2022-02-13
  • 2021-06-27
  • 2021-11-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-23
  • 2021-10-12
猜你喜欢
  • 2022-12-23
  • 2021-12-26
  • 2022-01-11
  • 2021-05-30
  • 2022-12-23
  • 2021-09-03
  • 2021-11-23
相关资源
相似解决方案