HTML CSS Reference/HTML Tag Reference/optgroup
Содержание
"optgroup" Event Handlers
+----------------+--------------------------------------------------------------+
| Event |onBlur onChange |
| Handlers |onClick onDblClick |
| |onFocus onKeyDown |
| |onKeyPress onKeyUp |
| |onMouseDown onMouseMove |
| |onMouseOut onMouseOver |
| |onMouseUp |
+----------------+--------------------------------------------------------------+
"optgroup" Example
<html>
<head>
<title>option element example</title>
</head>
<body>
<form name="form1" method="post" action="youractionscript.asp">
<p>
<span class="example">
<select name="select1">
<optgroup label="First Group">
<option>First item in first group</option>
<option>Second item in first group </option>
<option>Third item in first group </option>
</optgroup>
<optgroup label="Second Group">
<option>First item in second group </option>
<option>Second item in second group </option>
<option>Third item in second group </option>
</optgroup>
<optgroup label="Group 3">
<option>First item in Group 3</option>
<option>Second item in Group 3</option>
<option>Third item in Group 3</option>
</optgroup>
</select>
</span>
</p>
</form>
</body>
</html>
"optgroup" HTML Attributes
+----------------+--------------------------------------------------------------+
| HTML |disabled label |
+----------------+--------------------------------------------------------------+
"optgroup" JavaScript Collections
+----------------+--------------------------------------------------------------+
| JavaScript |attributes childNodes |
+----------------+--------------------------------------------------------------+
"optgroup" JavaScript Methods
+----------------+--------------------------------------------------------------+
| JavaScript |appendChild cloneNode |
| Methods |getAttribute getAttributeNode |
| |getElementsByTagName hasChildNodes |
| |insertBefore normalize |
| |removeAttribute removeAttributeNode |
| |removeChild replaceChild |
| |setAttribute setAttributeNode |
+----------------+--------------------------------------------------------------+
"optgroup" JavaScript Properties
+----------------+--------------------------------------------------------------+
| JavaScript |className clientHeight |
| Properties |clientWidth dir |
| |firstChild id |
| |innerHTML label |
| |lang lastChild |
| |nextSibling nodeName |
| |nodeType nodeValue |
| |offsetHeight offsetLeft |
| |offsetParent offsetTop |
| |offsetWidth ownerDocument |
| |parentNode previousSibling |
| |scrollHeight scrollLeft |
| |scrollTop scrollWidth |
| |tagName title |
+----------------+--------------------------------------------------------------+
"optgroup" Syntax and Note
Note:
This element creates multiple options within a <select> element list.
The option groups cannot be nested within other option groups.
Syntax:
<optgroup attributes events> . . . </optgroup>