HTML DOM OptionGroup Object
विकल्प समूह वस्तु
OptionGroup ऑब्जेक्ट एक HTML <optgroup> तत्व का प्रतिनिधित्व करता है।
एक विकल्प समूह वस्तु तक पहुँचें
आप getElementById() का उपयोग करके <optgroup> तत्व तक पहुंच सकते हैं:
उदाहरण
var x = document.getElementById("myOptgroup");
एक विकल्प समूह वस्तु बनाएँ
आप document.createElement() विधि का उपयोग करके एक <optgroup> तत्व बना सकते हैं:
उदाहरण
var x = document.createElement("OPTGROUP");
विकल्प समूह वस्तु गुण
Property | Description |
---|---|
disabled | Sets or returns whether an option-group is disabled, or not |
label | Sets or returns the value the label attribute of an option-group |
मानक गुण और घटनाएँ
OptionGroup ऑब्जेक्ट मानक गुणों और घटनाओं का भी समर्थन करता है ।
संबंधित पृष्ठ
HTML संदर्भ: HTML <optgroup> टैग