JQuery 动态填充、移除select option值

//添加

$("select[name='type']").append("");

$.each(typeList, function (i, item) {

$("select[name='detail_type']").append("");

});

//移除

$("select[name='type'] option[value='语文']").remove();

//初始选中

$(this).find("select[name='cost_bizType']").find("option[value='"+bizType+"']").attr("selected","true");//选中

你可能感兴趣的:(JQuery)