zoukankan      html  css  js  c++  java
  • easyui editor combobox multiple

    $.extend($.fn.datagrid.defaults.editors,{

    combobox: {

    init: function(container, options){

    var combo = $('<input type="text">').appendTo(container);

    combo.combobox(options || {});

    return combo;

    },

    destroy: function(target){

    $(target).combobox('destroy');

    },

    getValue: function(target){

    var opts = $(target).combobox('options');

    if (opts.multiple){

    return $(target).combobox('getValues').join(opts.separator);

    } else {

    return $(target).combobox('getValue');

    }

    },

    setValue: function(target, value){

    var opts = $(target).combobox('options');

    if (opts.multiple){

    if (value == ''){

    $(target).combobox('clear');

    } else {

    $(target).combobox('setValues', value.split(opts.separator));

    }

    } else {

    $(target).combobox('setValue', value);

    }

    },

    resize: function(target, width){

    $(target).combobox('resize', width)

    }

    }

    });

  • 相关阅读:
    Hadoop IO
    HDFS
    简介
    队列
    classLoader和Class.forName的区别
    String为什么是final类型的
    Fabric
    超级账本——面向企业的分布式账本
    以太坊
    pycharm破解教程
  • 原文地址:https://www.cnblogs.com/huangf714/p/6229285.html
Copyright © 2011-2022 走看看