Input Checkbox defaultChecked Property

❮ Input Checkbox Object

Example

Find out if the checkbox is checked by default:

var x = document.getElementById("myCheck").defaultChecked;
Try it Yourself »

Description

The defaultChecked property returns the default value of the checked attribute.

This property returns true if the checkbox is checked by default, otherwise it returns false.


Browser Support

Property
defaultChecked Yes Yes Yes Yes Yes

Syntax

checkboxObject.defaultChecked

Return Value

Type Description
Boolean Returns true if the checkbox is checked by default, otherwise it returns false.

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