• 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) {}
    }

  • 相关阅读:
    byte在计算机中的存储方式--Double.byteValue()的输出结果思考
    启动Eclipse时An internal error occurred during: "Initializing Java Tooling".错误
    java实现两个int数交换
    cmd编译运行java
    java配置环境变量
    使用jQuery获取session中存储的list集合
    搭建ssm框架,可实现登录和数据展示以及增删改查
    java 生成UUID
    jQuery serialize()方法获取不到数据,alert结果为空
    SpringMVC架构的项目,js,css等静态文件导入有问题
  • 原文地址:https://www.cnblogs.com/temporary/p/7240324.html
Copyright © 2020-2023  润新知