While processing forms in web development, it’s a common requirement to be able to tell if a checkbox has been checked or not.
It’s not immediately obvious though. Let’s dispell this and provide some ways to
First, we need an HTML checkbox to play around with.
You can also use a
Query Selector Pattern to tell if a value matches as follows:
jQuery comes with quite a nice way to do this using the