by jqueryAre you looking for this" />
开发者

set datasource for combobox

开发者 https://www.devze.com 2023-02-16 17:24 出处:网络
how to set datasoure of com开发者_开发技巧bobox by jquery data={\"a\",\"b\",\"c\",\"d\"}. and ComboBox.datasource=data;==>by jqueryAre you looking for this

how to set datasoure of com开发者_开发技巧bobox by jquery

data={"a","b","c","d"}. and ComboBox.datasource=data;==>by jquery


Are you looking for this using this plugin

http://plugins.jquery.com/plugin-tags/combobox

$(document).ready(function() {
            var data = ["a", "b", "c", "d"];
            var options;


            $.each(data, function(i, item ) { 
                options += "<option value='" + item + "'>" + item + "</option>";
            });

            $("#combobox").append(options).combobox();
 });

<select id="combobox"></select>
0

精彩评论

暂无评论...
验证码 换一张
取 消