"data": "ip",渲染回调函数中的data['ip']字段将传给render函数中的data;render函数的返回内容将代替"data":"ip"渲染到table中的cell中。

columns: [
    {   "data":"ip",
        "render": function ( data, type, row ) {
            return '<a href = "{% url 'host_mess' %}" > ' + data + '</a> ';
        },
        "targets": 0
    },
    { "data": "online_state" },
    { "data": "machine_id" },
    { "data": "location" },
    { "data": "agent_state" },
    { "data": "system" }
]

 

相关文章:

  • 2021-11-04
  • 2022-12-23
  • 2021-10-11
  • 2022-12-23
  • 2021-07-29
  • 2022-12-23
  • 2021-08-09
  • 2021-05-02
猜你喜欢
  • 2021-06-14
  • 2021-06-04
  • 2021-11-29
  • 2021-04-21
相关资源
相似解决方案