var o = new Option("option text", "value");
/// jquerify the DOM object 'o' so we can use the html method
$(o).html("option text");
$("#selectList").append(o);
0
匿名的
0 Comments
个人而言,我更喜欢使用以下语法来添加选项:
$('#mySelect').append($('
如果你需要从一个项目集中添加选项,可以这样做:
$.each(items, function (i, item) {
$('#mySelect').append($('