📜  多选复选框 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:21.783000             🧑  作者: Mango

代码示例1
var expanded = false;

function showCheckboxes() {
  var checkboxes = document.getElementById("checkboxes");
  if (!expanded) {
    checkboxes.style.display = "block";
    expanded = true;
  } else {
    checkboxes.style.display = "none";
    expanded = false;
  }
}