Md.*_*kar 3 jquery datatables identity-column
DataTable Image ->当我尝试获取这样的标题名称时..然后我只得到第一个列名称,即NAME ...但我需要获取所有标题名称。如何获取所有标题名称?
this.api().columns().every( function ($i) {
var column = this;
var order = this.order();
var title = this.column(order[0][$i]).header();
var tt = $(title).html();
console.log(tt);
})
Run Code Online (Sandbox Code Playgroud)
似乎有点过于复杂:
this.api().columns().every(function() {
console.log( this.header().textContent )
})
Run Code Online (Sandbox Code Playgroud)
会做“把戏”。
| 归档时间: |
|
| 查看次数: |
13763 次 |
| 最近记录: |