MDN self-hosted library · e01.org

HTMLInputElement: indeterminate property

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

html
<input type="checkbox" id="indeterminate-checkbox" />
<label for="indeterminate-checkbox">Indeterminate checkbox</label>
js
const checkbox = document.getElementById("indeterminate-checkbox");
checkbox.indeterminate = true;