zoukankan      html  css  js  c++  java
  • 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);
                    }
                });

  • 相关阅读:
    Excel 常用函数
    Excel中使用VBA访问Access数据库
    Python 日期和时间戳的转换
    tensorflow中命名空间、变量命名的问题
    Git:一个简单示例
    Pyhon中运算符的使用
    python中模块包的离线下载教程
    python中的进制转换
    python几种常见的模块安装方法
    python中的模块调用
  • 原文地址:https://www.cnblogs.com/yelanggu/p/7831502.html
Copyright © 2011-2022 走看看