JavaScript and Checkboxes

This part of the JavaScript and Forms Tutorial answers these common questions regarding JavaScript and checkboxes:

Examples and explanations are provided for each of these questions at the pages listed above.

Basic Facts about Checkboxes

Checkboxes can be set up individually or in groups. Groups of checkboxes can have the same name or their names can be distinct. Typical uses for checkboxes are yes or no questions (such as agreeing to terms of use), or lists of choices where more than one is possible (such as pizza toppings).

When you use JavaScript to interact with checkboxes, you will most often be working with the checked and value properties. The examples listed above demonstrate how to access and use these properties.