Properti label OptionGroup
Contoh
Ubah label/deskripsi grup opsi:
document.getElementById("myOptgroup").label = "A Random Car Selection";
Definisi dan Penggunaan
Properti label menetapkan atau mengembalikan nilai atribut label dari grup opsi.
Atribut label menentukan label/deskripsi untuk grup opsi.
Dukungan Peramban
Property | |||||
---|---|---|---|---|---|
label | Yes | Yes | Yes | Yes | Yes |
Sintaksis
Kembalikan properti label:
optiongroupObject.label
Setel properti label:
optiongroupObject.label = text
Nilai properti
Value | Description |
---|---|
text | Specifies a label/description for the option-group |
Detail Teknis
Nilai Kembali: | Sebuah String, mewakili label dari grup-opsi |
---|
Lebih Banyak Contoh
Contoh
Kembalikan label/deskripsi grup opsi:
var x = document.getElementById("myOptgroup").label;
Halaman Terkait
Referensi HTML: Atribut label <optgroup> HTML
Objek OptionGroup