DOM Properties

HTMLInputElement.indeterminate

Read/write. Controls the visual mixed state of a checkbox independently of checked. It cannot be set through an HTML content attribute and does not determine whether the checkbox is submitted. Synchronize it with the application's group state. Example result: true / false.

Formal Syntax & Structure

html syntaxhtml
element.indeterminate

Return Value

boolean

Property value. Read/write.

Working Example

Example Snippethtml
<input id="demo" type="checkbox"><p>  Result:  <output id="result"></output></p><script>  const e = document.getElementById('demo');  const result = value => { document.getElementById("result").textContent = String(value); };  e.indeterminate=true; result(e.indeterminate+' / '+e.checked);</script>
HTML Reference