我无法将复选框选中为取消选中复选框。将选中的复选框设置为取消选中
$("#search_list").find('.mselect input:checked').each(function(index, ele) {
var prodId = $(this).val();
console.log($(this));
//if($(this).is(':checked')){
//if($(this).length) {
$(productList).each(function(key, value) {
console.log("ohh"+value);
if(prodId == value){
$(this).prop('checked', false);
console.log($(this));
console.log("unchedk"+value);
}
});
//}
});
我的错误是什么?
您应包括控制你想改变你可以在浏览器控制台中看到的HTML,以及任何错误消息的变量。 – Tony