HTML CSS Reference/HTML Tag Reference/button

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

"button" CSS Attributes and JavaScript Style Properties

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



"button" Event Handlers

+----------------+--------------------------------------------------------------+
| Event          |onActivate                      onAfterUpdate                 |
| Handlers       |onBeforeActivate                onBeforeCut                   |
|                |onBeforeDeactivate              onBeforeEditFocus             |
|                |onBeforePaste                   onBeforeUpdate                |
|                |onBlur                          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                   onSelectStart                 |
|                |onTimeError                                                   |
+----------------+--------------------------------------------------------------+



"button" Example

    
<html>
<head>
<title>button element example</title></head>
<body>
   <center>
      <button type="button" 
              id="myButton" 
              style="font-weight:bold; 
                     color:darkblue; 
                     background:cyan; 
                     border-color:blue; 
                     font-family:Verdana;">
      Button</button> 
    </center>
</body>
</html>



"button" HTML Attributes

+----------------+--------------------------------------------------------------+
| HTML           |accesskey                       begin                         |
| Attributes     |class                           contenteditable               |
|                |datafld                         dataformatas                  |
|                |datasrc                         dir                           |
|                |disabled                        end                           |
|                |hidefocus                       id                            |
|                |lang                            language                      |
|                |name                            style                         |
|                |syncmaster                      systemBitrate                 |
|                |systemCaptions                  systemLanguage                |
|                |systemOverdubOrSubtitle         tabindex                      |
|                |timecontainer                   title                         |
|                |type                            unselectable                  |
|                |value                                                         |
+----------------+--------------------------------------------------------------+



"button" JavaScript Collections

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



"button" JavaScript Methods

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



"button" JavaScript Objects

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



"button" JavaScript Properties

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



"button" Microsoft Behaviors

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



"button" Microsoft Filters

+----------------+--------------------------------------------------------------+
| Microsoft      |Alpha                           Barn                          |
| Filters        |BasicImage                      BlendTrans                    |
|                |Blinds                          Blur                          |
|                |CheckerBoard                    Chroma                        |
|                |Compositor                      DropShadow                    |
|                |Emboss                          Engrave                       |
|                |Fade                            FlipH                         |
|                |FlipV                           Glow                          |
|                |GradientWipe                    Gray                          |
|                |ICMFilter                       Inset                         |
|                |Invert                          Iris                          |
|                |Light                           MaskFilter                    |
|                |Matrix                          MotionBlur                    |
|                |Pixelate                        RadialWipe                    |
|                |RandomBars                      RandomDissolve                |
|                |RevealTrans                     Shadow                        |
|                |Slide                           Spiral                        |
|                |Stretch                         Strips                        |
|                |Wave                            Wheel                         |
|                |Xray                            Zigzag                        |
+----------------+--------------------------------------------------------------+



"button" Syntax and Note

Note:
Provide richer rendering capabilities than <input type="submit"> and 
<input type="button">.
   
Syntax:
    
<button attributes events> . . . </button>