The HTML checkbox input element allows you to select a single value for submission in a form for example if you are creating a form and want to know if the applicant is fluent in English or not you can have a checkbox and if the user thinks he/she is fluent in English he/she checks it if not leaves it unchecked .
In this tutorial we are going to learn
- How to handle onclick and onchange events and the difference between them
- How to handle checkbox events in Jquery
- How to submit a form when checkbox is clicked
- Show/ Hide a section of the form when checkbox is clicked
To start working with checkboxes we will create a form that contains a checkbox , in this example we will be building a form that takes a user name and has also a checkbox that the user should check if he thinks he is fluent in English , if not a prompt will appear showing the user a text that says you need to be fluent in English to apply for the job.