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);
                    }
                });

  • 相关阅读:
    数据库异常处理记录
    FINEMVC重定向和显示合计
    有意思的文章的链接
    oralce 创建用户和权限
    FINEUI(MVC) grid 双击弹窗功能
    FINEUI(MVC)布局问题记录
    通过判断cookie过期方式向Memcached中添加,取出数据(Java)
    通过数组方式向Oracle大批量插入数据(10万条11秒)
    Python基础学习13--面向对象
    Python基础学习12--变量作用域
  • 原文地址:https://www.cnblogs.com/yelanggu/p/7831502.html
Copyright © 2011-2022 走看看