Input Checkbox indeterminate eigenschap
Definitie en gebruik
indeterminate
Of de status van de eigenschap is gewijzigd.
De knop heeft eigenlijk drie staten: true, false en indeterminate, wat betekent dat de knop noch aan staat noch uit staat.
De knop kan niet onzeker worden ingesteld via HTML-eigenschappen - het moet worden ingesteld via JavaScript.
Deze status kan worden gebruikt om de gebruiker te dwingen om de knop in te schakelen of uit te schakelen.
Voorbeeld
Stel de knop aan als onzeker:
document.getElementById("myCheck").indeterminate = true;
Syntaxis
Retourneren van de eigenschap indeterminate:
checkboxObject.indeterminate
Instellen van de eigenschap indeterminate:
checkboxObject.indeterminate = true|false
Attribute value
Value | Description |
---|---|
true|false |
Specify the state of the checkbox. Possible values:
|
Technical details
Return value: | Boolean value, returned if the checkbox is in an indeterminate state true , otherwise return false . |
Browser support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |