HTML CSS Reference/HTML Tag Reference/option
Содержание
- 1 "option" CSS Attributes and JavaScript Style Properties
- 2 "option" Event Handlers
- 3 "option" Example
- 4 "option" HTML Attributes
- 5 "option" JavaScript Collections
- 6 "option" JavaScript Methods
- 7 "option" JavaScript Objects
- 8 "option" JavaScript Properties
- 9 "option" Microsoft Behaviors
- 10 "option" Syntax and Note
"option" CSS Attributes and JavaScript Style Properties
Names noted with an asterisk (*) are JavaScript properties only.
+----------------+--------------------------------------------------------------+
| CSS |background-attachment background-color |
| Attributes |background-position-x background-position-y |
| and |behavior clear |
| JavaScript |color direction |
| Style |hasLayout(*) height |
| Properties |layout-flow layout-grid |
| |layout-grid-mode pixelBottom(*) |
| |pixelHeight(*) pixelLeft(*) |
| |pixelRight(*) pixelTop(*) |
| |pixelWidth(*) posBottom(*) |
| |posHeight(*) posLeft(*) |
| |posRight(*) posTop(*) |
| |posWidth(*) text-autospace |
| |text-underline-position unicode-bidi |
| |width word-wrap |
| |writing-mode zoom |
+----------------+--------------------------------------------------------------+
"option" Event Handlers
+----------------+--------------------------------------------------------------+
| Event |onBlur onChange |
| Handlers |onClick onDblClick |
| |onDrag onDragEnd |
| |onDragEnter onDragLeave |
| |onDragOver onDragStart |
| |onDrop onFocus |
| |onKeyDown onKeyPress |
| |onKeyUp onLayoutComplete |
| |onLoseCapture onMouseDown |
| |onMouseMove onMouseOut |
| |onMouseOver onPropertyChange |
| |onReadyStateChange onSelectStart |
| |onTimeError |
+----------------+--------------------------------------------------------------+
"option" 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>
"option" HTML Attributes
+----------------+--------------------------------------------------------------+
| HTML |begin class |
| Attributes |dir disabled |
| |end id |
| |label lang |
| |language selected |
| |syncmaster systemBitrate |
| |systemCaptions systemLanguage |
| |systemOverdubOrSubtitle timecontainer |
| |value |
+----------------+--------------------------------------------------------------+
"option" JavaScript Collections
+----------------+--------------------------------------------------------------+
| JavaScript |all attributes |
| Collections |behaviorUrns childNodes |
| |children |
+----------------+--------------------------------------------------------------+
"option" JavaScript Methods
+----------------+--------------------------------------------------------------+
| JavaScript |addBehavior appendChild |
| Methods |applyElement attachEvent |
| |clearAttributes click |
| |cloneNode componentFromPoint |
| |contains detachEvent |
| |dragDrop fireEvent |
| |getAdjacentText getAttribute |
| |getAttributeNode getBoundingClientRect |
| |getClientRects getElementsByTagName |
| |getExpression hasChildNodes |
| |insertAdjacentElement insertAdjacentHTML |
| |insertAdjacentText insertBefore |
| |mergeAttributes normalize |
| |releaseCapture removeAttribute |
| |removeAttributeNode removeBehavior |
| |removeChild removeExpression |
| |removeNode replaceAdjacentText |
| |replaceChild replaceNode |
| |setAttribute setAttributeNode |
| |setCapture setExpression |
| |swapNode |
+----------------+--------------------------------------------------------------+
"option" JavaScript Objects
+----------------+--------------------------------------------------------------+
| JavaScript |currentStyle runtimeStyle |
| Objects |style |
+----------------+--------------------------------------------------------------+
"option" JavaScript Properties
+----------------+--------------------------------------------------------------+
| JavaScript |canHaveChildren canHaveHTML |
| Properties |className clientHeight |
| |clientLeft clientTop |
| |clientWidth defaultSelected |
| |dir disabled |
| |end firstChild |
| |form hasLayout |
| |id index |
| |innerHTML innerText |
| |isContentEditable isDisabled |
| |isMultiLine isTextEdit |
| |label lang |
| |language lastChild |
| |nextSibling nodeName |
| |nodeType nodeValue |
| |offsetHeight offsetLeft |
| |offsetParent offsetTop |
| |offsetWidth ownerDocument |
| |parentElement parentNode |
| |parentTextEdit previousSibling |
| |readyState scopeName |
| |scrollHeight scrollLeft |
| |scrollTop scrollWidth |
| |selected tagName |
| |tagUrn text |
| |title uniqueID |
| |value |
+----------------+--------------------------------------------------------------+
"option" Microsoft Behaviors
+----------------+--------------------------------------------------------------+
| Microsoft |clientCaps download |
| Behaviors |homePage httpFolder |
| |saveFavorite saveHistory |
| |time time2 |
| |userData |
+----------------+--------------------------------------------------------------+
"option" Syntax and Note
Note:
This element creates a list item in a <select> element.
Syntax:
<option attributes events> . . . </option>