zoukankan      html  css  js  c++  java
  • easyUI comboselector使用

    easyUI提供了一个数据选择框 comboselector

    <input name="brand_name" id="brand_name" value="" class="easyui-validatebox" data-options="required:false, validType:'',  prompt: ''">

        $("#brand_name").comboselector($.extend({},window.brandList)); //会在input标签后面加上选择框按钮

    window.brandList={
            topMost:false,
            extToolbar:true,
            toolbar:[
                "品牌名",    
                {id:'searchtext',type:'textbox',options:{'width':80}},
                {type:"button",options:{
                    text:"查询",iconCls:"icon-search",handler:function(toolbar){
                        alert(toolbar);
                        var bar=$(toolbar),searchtext=bar.find("#searchtext").val(),
                        dg=bar.closest(".grid-selector-container").find(".grid-selector");
                        $.easyui.messager.show("查询 品牌名:{0}".format(searchtext));
                        dg.datagrid("load", { name : searchtext});
                    }
                  }
                }        
            ],
            singleSelect:true,
            //multiple:false,  
            method:"get",
            url:'${ctx}/car/brand/json', 
            idField:'id',
            textField:'name',
            autoShowPanel:false,
            remoteSort:false,
            pagination:true,
            columns:[[
            {field:"ck",checkbox:true},
            {field:"id",title:'ID',80},
            {field:"name",title:'品牌名',80}
           
            ]],
            onEnter: function (val) { $.easyui.messager.show(String(val.map(function (val) { return val.ID; }))); },
            onChange: function (newValue,oldValue) {}
    }

  • 相关阅读:
    分治
    #include<algorithm>
    c++标准模板库的使用
    mysql_day03
    mysql_day02
    mysql_day01
    mongodb的安装
    迭代器和生成器简单介绍
    File文件操作
    数据类型
  • 原文地址:https://www.cnblogs.com/temporary/p/7240324.html
Copyright © 2011-2022 走看看