效果:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta id="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
</style>
<script>
window.onload=function(){
//获取四个多选
var items=document.getElementsByName("items");
//获取全选/全不选 多选框
var checkedAllBox=document.getElementById("checkedAllBox");
//1.checkedAllBtn
var checkedAllBtn=document.getElementById("checkedAllBtn");
checkedAllBtn.onclick=function(){
for(var i=0;i<items.length;i++)