None of the above worked for me but simply use this:
document.querySelector('.messageCheckbox').checked;
More Related Contents:
- Checkbox hidden on body load [closed]
- Using jquery check/uncheck SelectAll checkbox when all the checkboxes in the group are checked/unchecked
- How do I check whether a checkbox is checked in jQuery?
- Setting “checked” for a checkbox with jQuery
- Check/Uncheck checkbox with JavaScript
- How to implement “select all” check box in HTML?
- jQuery checkbox change and click event
- How to stop event bubbling on checkbox click
- JQGRID – maintain check box selection state – page refresh / redirect / reload
- Testing if a checkbox is checked with jQuery
- How to check all checkboxes using jQuery?
- What the difference between .click and .change on a checkbox [duplicate]
- How to select all checkboxes with jQuery?
- Making sure at least one checkbox is checked
- How do I encode a JavaScript object as JSON?
- How do i disable a submit button when checkbox is uncheck?
- Possible to associate label with checkbox without using “for=id”?
- How to check in js that user has checked the checkbox in Google recaptcha?
- How to validate a form with multiple checkboxes to have atleast one checked
- How to reset all checkboxes using jQuery or pure JS?
- Creating the checkbox dynamically using JavaScript?
- Javascript checkbox onChange
- How do I determine if a checkbox is checked?
- Dynamic controlgroup and checkboxes unstyled
- submitting a form when a checkbox is checked
- jqGrid multiselect “check all” in header: how to hide it?
- Why does preventDefault on checkbox click event returns true for the checked attribute?
- Why isn’t my checkbox change event triggered?
- binding data to angular checkbox
- Custom Checkbox