How to get status of a CheckBox using JS?
1 Like
- Get the instance of the checkbox by using some DOM node finder method.
const checkbox = document.getElementById('your-checkbox-id')
- Simply check the checked state of the checkbox node instance:
checkbox.checked === true // true if checkbox was checked