<style>
*{
margin: 0;
padding: 0;
}
.title{
width: 600px;
margin: 0 auto 10px;
}
.mytable{
width: 600px;
border-collapse: collapse;
margin: 0 auto;
}
.mytable th,.mytable td{
height: 40px;
line-height: 40px;
padding: 6px;
font-size: 16px;
border: 1px solid black;
}
.cbox{
width: 22px;
height: 22px;
}
.ch{
width: 600px;
margin: 0 auto;
}
.ch button{
width: 80px;
height: 30px;
line-height: 30px;
font-size: 16px;
margin-right: 20px;
}
</style>
</head>
<body>
<h1 class="title">jav
javasript实现全选、反选、取消选中
![](https://img-home.csdnimg.cn/images/20240711042549.png)