Input Checkbox type attribute

Definition and Usage

type The property returns what type of form element the checkbox is.

For checkbox, this property will always return "checkbox".

Esimerkki

Selvitä, mikä tyyppi on valintaruutu lomakkeen elementti:

var x = document.getElementById("myCheck").type;

Kokeile itse

Syntaksi

checkboxObject.type

Tekninen yksityiskohta

Palautusarvo: Merkki. Valintaruudun lomakkeen elementtien tyyppi.

Selaimen tuki

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Tuki Tuki Tuki Tuki Tuki