标签:
<input id="select_city" name="select_city" class="easyui-combobox" style="width:435px" data-options="valueField:‘id‘, textField:‘text‘ >
方法一:
var data, json; json=‘[{"id":1 , "text":"兰州" },{"id":14 ,"text":"敦煌" ,"selected":true},{"id":15 , "text":"临夏"}]‘; data = $.parseJSON(json); $("#select_city").combobox("loadData", data);
方法二:
var data,json; data = []; data.push({ "text": "测试", "id": 100 }); $("#select_city").combobox("loadData", data);
JQuery EasyUI combobox动态添加option
标签:
原文地址:http://www.cnblogs.com/hailexuexi/p/4991438.html