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

  • 相关阅读:
    Lua IDE工具-Intellij IDEA+lua插件配置教程(Chianr出品)
    XLua热更新用法全流程总结(所有容易出问题的点)
    Unity用GUI绘制Debug/print窗口/控制台-打包后测试
    Unity在UI界面上显示3D模型/物体,控制模型旋转
    Eclipse的Debug调试技巧
    IntelliJ Idea 常用快捷键列表
    设计模式之代理模式的静态代理和动态代理
    设计模式之单例模式
    linux下防火墙设置
    FastDFS简介和安装
  • 原文地址:https://www.cnblogs.com/yelanggu/p/7831502.html
Copyright © 2011-2022 走看看