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

  • 相关阅读:
    [ios]总结iOS开发当中一些特别注意的问题 【转】
    [ios]Core Data
    [ios]图片转pdf 【转】
    rsync服务的安装与配置
    c# winform及DotnetBar笔记
    我恨博客园
    C#日期格式化(ASP.NET)
    c# winform DatagridView使用总结
    .net2.0数据绑定语法
    div代替window.alert,让这个div显示信息后,在指定之间时间内消失
  • 原文地址:https://www.cnblogs.com/yelanggu/p/7831502.html
Copyright © 2011-2022 走看看