HTMLInputElement: checked property - Web APIs | MDN
Value
A boolean.
Examples
js
const inputElement = document.getElementById("contactMail");
console.log(inputElement.checked);
inputElement.checked = true;
Specifications
| Specification |
|---|
| HTML # dom-input-checked |
Browser compatibility
See also
<input>HTMLInputElement.validity:checkedpseudo-class