【问题标题】:Datatable checkbox doesn't work with ajax数据表复选框不适用于 ajax
【发布时间】:2018-01-30 14:12:48
【问题描述】:

我将使用 jQuery Datatables for Classic asp 和 json https://datatables.net/ 非过滤数据表工作复选框,但过滤列复选框没有看到其他复选框已选中。 删除过滤器并检查工作。

复选框值添加到文本框中

var string = $checks.filter(":checked").map(function(i,v){
        return this.value;
        }).get().join(",");
        $('#idler').val(string);

Non filter datatable filter datatable

【问题讨论】:

    标签: jquery json datatables


    【解决方案1】:

    列过滤器不起作用 jquery

    1. $("input:checked").each(function(i) var string

    2. $checks.filter(":checked").map(function(i,v)

    我的工作函数 javascript

    var elm = document.getElementById('idler');
    var re = new RegExp(text, 'gi');
    if (elm.value.match(re)) {
        elm.value = elm.value.replace(re, '');
    }
    else {
        elm.value += text;
    }
    

    }

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-11-09
      • 2022-01-24
      • 1970-01-01
      • 1970-01-01
      • 2018-02-28
      • 1970-01-01
      • 1970-01-01
      • 2019-10-12
      相关资源
      最近更新 更多