zoukankan      html  css  js  c++  java
  • easyui easyui-combotree 模糊查询

    <input id="select" type="text" class="easyui-combotree" data-options=" 
    	    url: 'url地址',
    	    method:'get',
    	    checkbox:true,
    	    lines:true,
    	    multiple:true,
    	    panelHeight:150,
                panelWidth:250,
    	    clickNodeForSpan:true, 
    	    
                editable : true,
                onLoadSuccess: function (row, data) {
                        //$('this').combotree('tree').tree("collapseAll");     
                         $('this').combotree('tree').tree("expandAll");  //这个必须写,否则查询不正确    
                    }
                keyHandler : {
                    query : function(q) {
    		    var t = $(this).combotree('tree');  
    		    var nodes = t.tree('getChildren');  
    		    for(var i=0; i<nodes.length; i++){  
    		        var node = nodes[i];  
    		        if (node.text.indexOf(q) >= 0){  
                                $(node.target).show();  
    		        } else {  
                                $(node.target).hide();  
    		        }  
    		        var opts = $(this).combotree('options');  
    		        if (!opts.hasSetEvents){  
                            opts.hasSetEvents = true;  
                            var onShowPanel = opts.onShowPanel;  
                            opts.onShowPanel = function(){  
                            var nodes = t.tree('getChildren');  
                            for(var i=0; i<nodes.length; i++){  
                                $(nodes[i].target).show();  
                            }  
                            onShowPanel.call(this);  
                        };  
                        $(this).combo('options').onShowPanel = opts.onShowPanel;  
    	        }  
    	        }
    	   }
         " />
    
  • 相关阅读:
    [图解数据结构] 线性表
    利用爬虫获取网上医院药品价格信息 (上)
    手把手教你写网络爬虫(1):网易云音乐歌单
    用python实现与小米网关通讯
    eclipse添加lombok无法启动
    mongodb数据出现undefined如何查询
    初探active mq
    base64和图片互转
    设置Linux下Mysql表名不区分大小写
    Windows下安装MySQL5.6绿色版
  • 原文地址:https://www.cnblogs.com/zwgblogs/p/12097940.html
Copyright © 2011-2022 走看看