【发布时间】:2017-11-02 07:02:03
【问题描述】:
我有一个 ASP.NET GridView(称为“ActionsGrid”),其中有几个 BoundFields 作为列。在我的 JavaScript 中,我想查看每个选定的行(类名“突出显示”)并从特定列(1、3 和 4)中提取单元格值。
这是我的脚本:
var params = [];
$('#ActionsGrid tr').each(function () {
if (this.className === 'highlighted') {
var record_pk = this.children("td:nth-child(1)");
var obj_name = this.children("td:nth-child(3)");
var obj_pk = this.children("td:nth-child(4)");
params.push(record_pk + "," + obj_name + "," + obj_pk + "¬");
}
});
我的变量只是返回“未定义”。我接近了吗?
【问题讨论】:
标签: javascript c# jquery asp.net gridview