2.根據type="checkbox"選中所有checkbox
const checkList = document.querySelectorAll('input[type="checkbox"]');
3.修改checkbox選中狀態
// 選中
document.querySelector('input[type="checkbox"]').checked = true;
// 取消選中
document.querySelector('input[type="checkbox"]').checked = false;
4.獲取checkbox的value
const curValue = document.querySelector('input[type="checkbox"]').value;