Multi-marquee name is checkboxlist is to replace the other checkboxes state check box is selected.
function queryListByParam(e){ $("input[name='checkboxlist']").each(function () { if (this.checked && e.value != this.value){ this.checked = false; } }); }
The box functions to single box
$(document).off('click',".table-window :checkbox").on('click',".table-window :checkbox",function(){ var flag = $(this).prop("checked"); //先记录下点击后应该的状态 $("input[type='checkbox']").prop("checked", false); $(this).prop("checked", flag); });
Reference URL: https: //blog.csdn.net/weixin_40542512/article/details/80856321