我在我的 HTML 表上使用 jQuery 数据表插件。
我想知道如何使用 fnGetHiddenNodes() 函数从表中提取特定行。
更具体地说,
我将此作为专栏之一
tr
td align="center"
input type="checkbox" id="caseConsent(index)" name="caseConsent"
input type="hidden" id="protCaseInst(index)" name="protCaseInst" value="some value here..unique to each row"
td
td.../td
/tr
目前,我从该表中提取值的方式如下:(基本上,将检查到 protCaseInstArray 的每一行的隐藏字段“protCaseInst”的值推送)
$("#mydiv-element").find("input[type='checkbox' name='caseConsent']:checked ~ input[name='protCaseInst']").each(function() {
protCaseInstArray.push($(this).val());
});
但是,使用此代码,如果我从数据表的第二页中选择行,它们不会出现在我的 protCaseInstArray 中。
谢谢,