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:
Secondly, we code the JavaScript to validate the submitted message,and show the result on the HTML page.The code are given below: