js:

if (document.getElementById("checkboxID").checked) {
  alert("checkobx is checked");
} 

jquery:

if ($("#checkboxID").prop("checked")) {
  alert("checkbox is checked");
}

 

if ($("#checkboxID").is(":checked")) {
  alert("checkbox is checked");
}

 

相关文章:

  • 2021-12-04
  • 2021-12-09
  • 2021-11-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
  • 2021-12-09
猜你喜欢
  • 2021-07-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-17
  • 2021-12-09
相关资源
相似解决方案