$(function () {
var allBox = $(":checkbox");
allBox.click(function () {
if(this.checked){
allBox.removeAttr("checked");
$(this).attr("checked", "checked");
}
});
});
转载于:https://www.cnblogs.com/ch-zaizai/p/5147357.html