【发布时间】:2021-01-15 00:41:19
【问题描述】:
以下是我尝试查找发生在服务器端的数据包的数据属性,但我没有得到它
$('#mytable tbody').on('dblclick', 'tr', function () {
var data = table.row(this).find('data-source');
console.log(data);
console.log(data.find('data-source'));
});
这块在控制台的html看起来是这样的
我正在尝试获取价值,但我使用的代码不正确
【问题讨论】:
-
你的数据表的结构是什么?
-
table未定义。在我看来,这就像检查员,而不是控制台。.find('[data-source]')是通过 HTML 属性获取元素的方式。
标签: javascript jquery datatable datatables