EasyUI combobox使用

时间:13-05-28 栏目:EasyUI 作者:zongyan86 评论:0 点击: 5,705 次

javascript:

 var GladeHandler = "../SystemManage/Handler/GladeHandler.ashx";         
 $('#selGlade').combobox({
         url: Handler(GladeHandler, [["t", "CobmoList"]]),
         valueField: 'id',
         textField: 'text',
         panelHeight:'auto',//面板自动高度
         panelWidth: 142,//面板宽度
         width:142//select宽度
});  

json:

    [{  
        "id":1,  
        "text":"text1"  
    },{  
        "id":2,  
        "text":"text2"  
    },{  
        "id":3,  
        "text":"text3",  
        "selected":true  
    },{  
        "id":4,  
        "text":"text4"  
    },{  
        "id":5,  
        "text":"text5"  
    }]  

当然也可以用这种:

 <select class="easyui-combobox" style="width: 142px;" id="selState" name="selState"
panelheight="auto" required="true">
        <option value="0">启用</option>
        <option value="1">禁用</option>
 </select>

web开发分享



声明: 本文由( zongyan86 )原创编译,转载请保留链接: EasyUI combobox使用

关注我们