• easyui combobox 带 checkbox 亲自验证


    $('#cc').combobox({
                    url:'combobox_data1.json',
                    method:'get',
                    valueField:'id',
                    textField:'text',
                    panelHeight:'auto',
                    multiple:true,
                    formatter: function (row) {
                        var opts = $(this).combobox('options');
                        return '<input type="checkbox" class="combobox-checkbox">' + row[opts.textField]
                    },
                    onLoadSuccess: function () {
                        var opts = $(this).combobox('options');
                        var target = this;
                        var values = $(target).combobox('getValues');
                        $.map(values, function (value) {
                            var el = opts.finder.getEl(target, value);
                            el.find('input.combobox-checkbox')._propAttr('checked', true);
                        })
                    },
                    onSelect: function (row) {
                        //console.log(row);
                        var opts = $(this).combobox('options');
                        var el = opts.finder.getEl(this, row[opts.valueField]);
                        el.find('input.combobox-checkbox')._propAttr('checked', true);
                    },
                    onUnselect: function (row) {
                        var opts = $(this).combobox('options');
                        var el = opts.finder.getEl(this, row[opts.valueField]);
                        el.find('input.combobox-checkbox')._propAttr('checked', false);
                    }
                });

  • 相关阅读:
    运算符
    转载:C/C++源代码到可执行程序的过程详解
    #define与运算精度问题探究
    字符数组char
    解决蓝屏代吗0x0000007B的几种常见办法
    转载~vim配置文件
    Ubuntu kill命令用法详解
    How To Ask Questions The Smart Way
    提问的智慧
    【NOIP2012提高组】国王游戏 贪心 + 高精度
  • 原文地址:https://www.cnblogs.com/yelanggu/p/7831502.html
Copyright © 2020-2023  润新知