{hero}

cells().data()

自:DataTables 1.10

取得選取儲存格的資料。

說明

此方法用於從 cells() 呼叫中使用的選擇器檢索的儲存格中取得資料。

請注意,與其單數對應項 (cell().data()) 不同,此方法沒有「設定」形式。它只能用於檢索資料。

類型

function cells().data()

說明

取得選定儲存格的資料

回傳

DataTables API 實例,其中包含結果集中每個選定儲存格的資料

範例

取得所有類別為 'info' 的儲存格的資料

var table = new DataTable('#myTable');
var data = table.cells('.info').data();

console.log(data);

相關

以下選項直接相關,也可能在您的應用程式開發中很有用。