Input Checkbox indeterminate Property

❮ Input Checkbox Object

Example

Set a checkbox to indeterminate state:

document.getElementById("myCheck").indeterminate = true;
Try it Yourself »

Description

The indeterminate property sets or returns whether the state of a checkbox has changed.

Checkboxes actually has three states: true, false and indeterminate which indicates that a checkbox is neither "on" or "off".

A checkbox cannot be set to indeterminate state by an HTML attribute - it must be set by a JavaScript.

This state can be used to force the user to check or uncheck the checkbox.


Browser Support

Property
indeterminate Yes Yes Yes Yes Yes


Syntax

Return the indeterminate property:

checkboxObject.indeterminate

Set the indeterminate property:

checkboxObject.indeterminate = true|false

Property Values

Value Description
true|false Specifies the state of the checkbox

Possible values:
  • true - The checkbox is in indeterminate state
  • false - Default. The checkbox is not in indeterminate state

Technical Details

Return Value: A Boolean, returns true if the checkbox is in indeterminate state, otherwise it returns false

❮ Input Checkbox Object
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.