遍历option并获取value 值 (inde 参数不能少)
$("#parent>option").each(function(index,result){
if(data.PARENT_ID==$(result).val()){
$(this).attr("selected","selected");
}
});
动态创建标签
$.each(data,function(index,item){
if(0==index){
$("#shopName").text(item.shopName)
}
//动态生成下拉列表
// var option= "<option value="+'+item.sendId+'+" >+item.senderName+</option>"
var option = $("<option>").text(item.senderName).val(item.sendId);
$("#sender_select").append(option);
$("#sender_select option:last").attr('selected','true');
})