1、将Select的选项添加到结果中
$add.on('click', function () {
$.ajax({
url: '/Includes/Controls/AssociatedCountrysHandler.ashx',
data: {
action_type: 'add-associated-country',
useraddress_id: userAddressID,
country_id: $select.val()
},
success: function (data) {
var html='';
$.each(data, function (i, val) {
html += '<li>' + val.CountryName + "<a class='models-delete delete-associate-country' data-id='" + val.CountryID + "' href='/go.html?url=#'><img src='/content/images/icon/cross.png' alt='Delete' /></a>" + '</li>';
})
$('.associated-country-list').html(html);
}
});
return false;
});
$add.on('click', func