<!DOCTYPE html>
<html>
<head>
<style>
a { display: inline-block; }
</style>
<script src="./jquery-2.0.0.js"></script>
</head>
<body>
羽毛球<input class="box1" type="checkbox" name="aihao1" id="yumao" value="yumao" />
平棒球<input type="checkbox" name="aihao2" id="" value="pinbang" />
篮球<input type="checkbox" name="aihao3" id="" value="lanqiu" /><br>
<input type="radio" name="sel" id="se" value="se" />全选</br>
<input type="radio" name="sel" id="se1" value="f" />反选
<script>
let a = $(':radio:first');
let yumao = $('#yumao');
console.log(yumao.prop('checked'))
console.log(yumao)
a.click(function(){
$(':checkbox').attr('checked',true);
console.log(yumao)
})
let b = $(':radio:last');
b.click(function(){
$(':checkbox').attr('checked',false);
console.log(yumao)
})
</script>
</body>
</html>