How to Check if the Checkbox is Selected in jQuery

When the form submitted from the browser,we can use jQuery to count the selected number of checkboxes and to do judgment in order to get the message from the checkboxes. The next,we can prompt the error message or show the result.

Firstly,create a html page. The code are given below:




Assembly Language

Please select one checkbox at least

Secondly, we code the JavaScript to validate the submitted message,and show the result on the HTML page.The code are given below:

arthinking wechat