我有选择下拉菜单我在该下拉列表中提供了2种不同的送货方式。如果我选择啜饮1我想隐藏Rest fexex运输选项 &安培;反之亦然,如果我选择任何联邦快递方法,我想隐藏免费提货
请检查下面的小提琴
var query = _context.AppSubOperationUserGroupMappings.Where(filterPredicate)
.Select(x => x.UserGroup);
var allowedUserGroups = _context.Users.Where(x => x.Id == userId)
.SelectMany(x => x.UserGroupUserMappings, (x, y) => y.UserGroup);
return query
.Join(
allowedUserGroups,
x => x.Id,
x => x.Id,
(x, y) => false) // doesn't matter what to select
.Any();
答案 0 :(得分:0)
尝试这样的事情(未经测试)
$('select').on('change', function() {
var arr1 = $('#shipping_method option:not(:selected)');
for (var i = 0; i < arr1.length; i++) {
$("#shipping_method").children("optgroup[label='" + arr1[i].value + "']").remove();
console.log("removed");
}
})