JavaScript Reference/Javascript Objects/document

Материал из Web эксперт
Версия от 08:22, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

"document" Event Handlers

+----------------+--------------------------------------------------------------+
| Event          |onActivate                      onBeforeActivate              |
| Handlers       |onBeforeCut                     onBeforeDeactivate            |
|                |onBeforeEditFocus               onBeforePaste                 |
|                |onClick                         onContextMenu                 |
|                |onControlSelect                 onCut                         |
|                |onDblClick                      onDeactivate                  |
|                |onDrag                          onDragEnd                     |
|                |onDragEnter                     onDragLeave                   |
|                |onDragOver                      onDragStart                   |
|                |onDrop                          onFocusIn                     |
|                |onFocusOut                      onHelp                        |
|                |onKeyDown                       onKeyPress                    |
|                |onKeyUp                         onMouseDown                   |
|                |onMouseMove                     onMouseOut                    |
|                |onMouseOver                     onMouseUp                     |
|                |onMouseWheel                    onMove                        |
|                |onMoveEnd                       onMoveStart                   |
|                |onPaste                         onPropertyChange              |
|                |onReadyStateChange              onResizeEnd                   |
|                |onResizeStart                   onSelectionChange             |
|                |onStop                                                        |
+----------------+--------------------------------------------------------------+



"document" Example

    
<html>
<body>
<title>document object example</title>
<button onclick="alert(document.title);">Document title</button>
</body>
</html>



"document" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<custom>                        popup                         |
|                |window                                                        |
+----------------+--------------------------------------------------------------+



"document" JavaScript Collections

+----------------+--------------------------------------------------------------+
| JavaScript     |all                             anchors                       |
| Collections    |applets                         childNodes                    |
|                |embeds                          forms                         |
|                |frames                          images                        |
|                |links                           namespaces                    |
|                |plugins                         scripts                       |
|                |styleSheets                                                   |
+----------------+--------------------------------------------------------------+



"document" JavaScript Methods

+----------------+--------------------------------------------------------------+
| JavaScript     |attachEvent                     close                         |
| Methods        |createAttribute                 createComment                 |
|                |createDocumentFragment          createElement                 |
|                |createEventObject               createStyleSheet              |
|                |createTextNode                  detachEvent                   |
|                |elementFromPoint                execCommand                   |
|                |focus                           getElementById                |
|                |getElementsByName               getElementsByTagName          |
|                |hasFocus                        open                          |
|                |queryCommandEnabled             queryCommandIndeterm          |
|                |queryCommandState               queryCommandSupported         |
|                |queryCommandValue               recalc                        |
|                |releaseCapture                  setActive                     |
|                |write                           writeln                       |
+----------------+--------------------------------------------------------------+



"document" JavaScript Objects

+----------------+--------------------------------------------------------------+
| JavaScript     |<body>                          implementation                |
| Objects        |location                        selection                     |
|                |<title>                                                       |
+----------------+--------------------------------------------------------------+



"document" JavaScript Properties

+----------------+--------------------------------------------------------------+
| JavaScript     |activeElement                   alinkColor                    |
| Properties     |bgColor                         charset                       |
|                |compatMode                      cookie                        |
|                |defaultCharset                  designMode                    |
|                |dir                             doctype                       |
|                |documentElement                 domain                        |
|                |encoding                        expando                       |
|                |fgColor                         fileCreatedDate               |
|                |fileModifiedDate                fileSize                      |
|                |height                          lastModified                  |
|                |linkColor                       parentWindow                  |
|                |protocol                        readyState                    |
|                |referrer                        title                         |
|                |uniqueID                        URL                           |
|                |URLUnencoded                    vlinkColor                    |
|                |width                           XMLDocument                   |
+----------------+--------------------------------------------------------------+



"document" Syntax and Note

Note:
Access to all the objects in a page.
    
Syntax:
    
objectName.document.memberName