EasyUI

效果:

html代码:

        <input id ="comb" name ="comb"/>

JS代码:

    $(function () {
        $('#comb').combobox({
             100,
            valueField: 'id',
            textField: 'name',
            url:'../Json/comboBoxjson.ashx',
        });
    })

后台一般处理程序代码:

        public void ProcessRequest(HttpContext context)
        {
            DataTable dt = SQLHelper.ExecuteTable("select id, name from Tb_person", CommandType.Text);
            string comboboxjson = DatatableToJson.ToJson(dt);
            context.Response.Write(comboboxjson);
        }
原文地址:https://www.cnblogs.com/KTblog/p/4939074.html