如图所示
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<!-- 购物车 全选-->
爱好:
<input type="checkbox" checked='checked'> 学习
<input type="checkbox"> 读书
<input type="checkbox" id="xz"> <label for="xz">写作</label>
<label><input type="checkbox"> 旅行</label>
<br>
<button>全选</button><button>反选</button><button>取消全选</button>
<script>
var in