HTMLOptGroupElement

HTMLOptGroupElement 接口提供一些特别的属性和方法(除了从 HTMLElement 对象接口中继承的以外)以调整 <optgroup> 元素的布局和显示。

属性

HTMLElement 中继承属性。

HTMLOptGroupElement.disabled
是一个 boolean,表示整个子代 <option> 列表是可用的(false)还是不可用的(true)。
HTMLOptGroupElement.label
是一个 DOMString,表示该分组的标签。

方法

没有专有的方法;从 HTMLElement 中继承方法。

规范

规范 状态 注释
HTML Living Standard
HTMLOptgroupElement
Living Standard
HTML5
HTMLOptGroupElement
Recommendation Document Object Model (DOM) Level 2 HTML Specification 相比没有变化
Document Object Model (DOM) Level 2 HTML Specification
HTMLOptGroupElement
Obsolete Document Object Model (DOM) Level 1 Specification 相比没有变化
Document Object Model (DOM) Level 1 Specification
HTMLOptGroupElement
Obsolete 初始定义

浏览器兼容性

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
HTMLOptGroupElementChrome Full support YesEdge Full support 12Firefox Full support YesIE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
disabledChrome Full support YesEdge Full support 12Firefox Full support YesIE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
labelChrome Full support YesEdge Full support 12Firefox Full support YesIE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes

Legend

Full support  
Full support

参见