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;  
    	        }  
    	        }
    	   }
         " />
    
  • 相关阅读:
    毕业两年
    Python & PyCharm & Django 搭建web开发环境(续)
    Python & PyCharm & Django 搭建web开发环境
    Jboss7 部署EJB3 简明教程
    java 、HashMap 和单例
    一个Flex 对话框的坑
    一道文本处理题目的思考
    synchronized 与 Lock 的那点事
    推荐5款简洁美观的Hexo主题
    【HTTP缓存】浏览器缓存理论知识
  • 原文地址:https://www.cnblogs.com/zwgblogs/p/12097940.html
Copyright © 2011-2022 走看看