Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Checkbox type attribute

Checkbox type attribute

Checkbox Object Reference Checkbox Object


Definition and Usage

The type attribute returns the form type of the element.

For a checkbox object, this attribute always returns "checkbox".

Syntax

checkboxObject.type


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the type property.


Example

Example

The example below returns the form element type of the checkbox:

Runoob Tutorial(runoob.com)

Do you like summer?

Try it »


Checkbox Object Reference Checkbox Object