كائن HTML DOM OptionGroup
كائن OptionGroup
يمثل كائن OptionGroup عنصر <optgroup> HTML.
الوصول إلى كائن OptionGroup
يمكنك الوصول إلى عنصر <optgroup> باستخدام getElementById ():
مثال
var x = document.getElementById("myOptgroup");
قم بإنشاء كائن OptionGroup
يمكنك إنشاء عنصر <optgroup> باستخدام طريقة document.createElement ():
مثال
var x = document.createElement("OPTGROUP");
خصائص كائن OptionGroup
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>