Learn how to configure these components to host a python web application
“Pressure is something you feel when you don’t know what the hell you’re doing.” ― Peyton Manning
A frequent concern when using jQuery for web development is: how to check if a checkbox is checked? There are multiple ways of accomplishing this task which we illustrate with examples in this article.
2. Using the DOM property “checked”
A checkbox is of the type HTMLInputElement and has a property called “checked” whose value is “true” if it is checked.
In the following example, thisrefers to the checkbox DOM element whose property “checked” is being checked. The event handler is invoked after the element is clicked and the function outputs the current state of the checkbox: