Making sure at least one checkbox is checked

后端 未结 9 784
天命终不由人
天命终不由人 2020-11-27 16:39

I have a form with multiple checkboxes and I want to use JavaScript to make sure at least one is checked. This is what I have right now but no matter what is chosen an alert

9条回答
  •  借酒劲吻你
    2020-11-27 17:15

    You can check that atleast one checkbox is checked or not using this simple code. You can also drop your message.

    Reference Link

    
         ck1
    ck2

提交回复
热议问题