HTML CSS Reference/HTML Tag Reference/select

Материал из Web эксперт
Перейти к: навигация, поиск

"select" CSS Attributes and JavaScript Style Properties

Names noted with an asterisk (*) are JavaScript properties only.
+----------------+--------------------------------------------------------------+
| CSS            |!important                      accelerator                   |
| Attributes     |background-color                behavior                      |
| and            |bottom                                                        |
| JavaScript     |clear                           clip                          |
| Style          |color                           cursor                        |                                                              |
| Properties     |direction                       display                       |                                                              |
|                |filter                          float                         |
|                |font                            font-family                   |
|                |font-size                       font-style                    |
|                |font-variant                    font-weight                   |
|                |hasLayout(*)                    height                        |
|                |ime-mode                        layout-flow                   |
|                |layout-grid                     layout-grid-mode              |
|                |left                            letter-spacing                |
|                |line-height                     padding                       |
|                |padding-bottom                  padding-left                  |
|                |padding-right                   padding-top                   |
|                |pixelBottom(*)                  pixelHeight(*)                |
|                |pixelLeft(*)                    pixelRight(*)                 |
|                |pixelTop(*)                     pixelWidth(*)                 |
|                |posBottom(*)                    posHeight(*)                  |
|                |position                        posLeft(*)                    |
|                |posRight(*)                     posTop(*)                     |
|                |posWidth(*)                     styleFloat(*)                 |
|                |text-autospace                  text-decoration               |
|                |text-transform                  text-underline-position       |
|                |textDecorationBlink(*)          textDecorationLineThrough(*)  |
|                |textDecorationNone(*)           textDecorationOverline(*)     |
|                |textDecorationUnderline(*)      top                           |
|                |unicode-bidi                    visibility                    |
|                |width                           word-spacing                  |
|                |word-wrap                       zoom                          |
+----------------+--------------------------------------------------------------+



"select" Event Handlers

+----------------+--------------------------------------------------------------+
| Event          |onActivate                      onAfterUpdate                 |
| Handlers       |onBeforeActivate                onBeforeCopy                  |
|                |onBeforeCut                     onBeforeDeactivate            |
|                |onBeforeEditFocus               onBeforePaste                 |
|                |onBeforeUpdate                  onBlur                        |
|                |onChange                        onClick                       |
|                |onContextMenu                   onControlSelect               |
|                |onCut                           onDblClick                    |
|                |onDeactivate                    onDrag                        |
|                |onDragEnd                       onDragEnter                   |
|                |onDragLeave                     onDragOver                    |
|                |onDragStart                     onDrop                        |
|                |onErrorUpdate                   onFilterChange                |
|                |onFocus                         onFocusIn                     |
|                |onFocusOut                      onHelp                        |
|                |onKeyDown                       onKeyPress                    |
|                |onKeyUp                         onLoseCapture                 |
|                |onMouseDown                     onMouseEnter                  |
|                |onMouseLeave                    onMouseMove                   |
|                |onMouseOut                      onMouseOver                   |
|                |onMouseUp                       onMouseWheel                  |
|                |onMove                          onMoveEnd                     |
|                |onMoveStart                     onPaste                       |
|                |onPropertyChange                onReadyStateChange            |
|                |onResize                        onResizeEnd                   |
|                |onResizeStart                   onSelect                      |
|                |onSelectStart                   onTimeError                   |
+----------------+--------------------------------------------------------------+



"select" Example

    
<html>
<head>
<title>select element example</title>
</head>
<body>
 <form>
    <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> 
     </select>
 </form>
</body>
</html>



"select" HTML Attributes

+----------------+--------------------------------------------------------------+
| HTML           |accesskey                      align                          |
| Attributes     |class                          datafld                        |
|                |datasrc                        dir                            |
|                |disabled                       hidefocus                      |
|                |id                             lang                           |
|                |language                       multiple                       |
|                |name                           size                           |
|                |style                          tabindex                       |
|                |title                          unselectable                   |
|                |value                                                         |
+----------------+--------------------------------------------------------------+



"select" JavaScript Collections

+----------------+--------------------------------------------------------------+
| JavaScript     |all                             attributes                    |
| Collections    |behaviorUrns                    childNodes                    |
|                |children                        options                       |
+----------------+--------------------------------------------------------------+



"select" JavaScript Methods

+----------------+-------------------------------------------------------------+
| JavaScript     |add                             addBehavior                  |
| Methods        |appendChild                     applyElement                 |
|                |attachEvent                     blur                         |
|                |clearAttributes                 click                        |
|                |cloneNode                       componentFromPoint           |
|                |contains                        detachEvent                  |
|                |dragDrop                        fireEvent                    |
|                |focus                           getAdjacentText              |
|                |getAttribute                    getAttributeNode             |
|                |getBoundingClientRect           getClientRects               |
|                |getElementsByTagName            getExpression                |
|                |hasChildNodes                   insertAdjacentElement        |
|                |insertAdjacentHTML              insertAdjacentText           |
|                |insertBefore                    mergeAttributes              |
|                |namedItem                       normalize                    |
|                |releaseCapture                  remove                       |
|                |removeAttribute                 removeAttributeNode          |
|                |removeBehavior                  removeChild                  |
|                |removeExpression                removeNode                   |
|                |replaceAdjacentText             replaceChild                 |
|                |replaceNode                     scrollIntoView               |
|                |setActive                       setAttribute                 |
|                |setAttributeNode                setCapture                   |
|                |setExpression                   swapNode                     |
|                |urns                                                         |
+----------------+-------------------------------------------------------------+



"select" JavaScript Objects

+----------------+--------------------------------------------------------------+
| JavaScript     |currentStyle                    runtimeStyle                  |
| Objects        |style                                                         |
+----------------+--------------------------------------------------------------+



"select" JavaScript Properties

+----------------+--------------------------------------------------------------+
| JavaScript     |accessKey                       align                         |
| Properties     |canHaveChildren                 canHaveHTML                   |
|                |className                       clientHeight                  |
|                |clientLeft                      clientTop                     |
|                |clientWidth                     dataFld                       |
|                |datasrc                         dir                           |
|                |disabled                        firstChild                    |
|                |form                            hasLayout                     |
|                |hideFocus                       id                            |
|                |innerHTML                       innerText                     |
|                |isContentEditable               isDisabled                    |
|                |isMultiLine                     isTextEdit                    |
|                |lang                            language                      |
|                |lastChild                       length                        |
|                |multiple                        name                          |
|                |nextSibling                     nodeName                      |
|                |nodeType                        nodeValue                     |
|                |offsetHeight                    offsetLeft                    |
|                |offsetParent                    offsetTop                     |
|                |offsetWidth                     outerHTML                     |
|                |outerText                       ownerDocument                 |
|                |parentElement                   parentNode                    |
|                |parentTextEdit                  previousSibling               |
|                |readyState                      recordNumber                  |
|                |scopeName                       scrollHeight                  |
|                |scrollLeft                      scrollTop                     |
|                |scrollWidth                     selectedIndex                 |
|                |size                            sourceIndex                   |
|                |tabIndex                        tagName                       |
|                |tagUrn                          type                          |
|                |uniqueID                        value                         |
|                |title                           type                          |
|                |uniqueID                        value                         |
|                |wrap                                                          |
+----------------+--------------------------------------------------------------+



"select" Microsoft Behaviors

+----------------+--------------------------------------------------------------+
| Microsoft      |clientCaps                      download                      |
| Behaviors      |homePage                        httpFolder                    |
|                |saveFavorite                    saveHistory                   |
|                |saveSnapshot                    time                          |
|                |userData                                                      |
+----------------+--------------------------------------------------------------+



"select" Syntax and Note

Note: 
    
Creates a drop-down or pick list. 
The options displayed are created in the <option> element.

Syntax:
<select attributes events> . . . </select>