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

set datasource for combobox

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜