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;  
    	        }  
    	        }
    	   }
         " />
    
  • 相关阅读:
    CSS Frameworks Collection(css框架收集)
    CSS:IE与Firefox的CSS兼容大全
    一般的 DIV + CSS 三栏式排版
    C#获取与修改HTML DOM元素信息
    101 LINQ Samples
    IE,Firefox,Chrome都可用的阴影效果
    QT中字符串编码的选用
    QT中字符串及其编码
    QT多项目编译顺序
    QT字符串编码知识汇编
  • 原文地址:https://www.cnblogs.com/zwgblogs/p/12097940.html
Copyright © 2011-2022 走看看