var option = ''; $.each(data, function (i, v) { option += "<option value='" + i + "'>" + v + "</option>"; }); $("#select").append(option);
var option = ''; $.each(data, function (i, v) { option += "<option value='" + i + "'>" + v + "</option>"; }); $("#select").append(option);
转载于:https://www.cnblogs.com/JaniceDong/p/9202153.html