JavaScript Reference/Javascript Objects/event

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

"event" Example

    
<html>
<body>
<button style="position:absolute; left:10; top:10;" 
        onclick="alert(event.x);">
The x coordinate of your pointer when you click this button is!
</button>
</body>
</html>



"event" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |window                                                        |
+----------------+--------------------------------------------------------------+



"event" JavaScript Collections

+----------------+--------------------------------------------------------------+
| JavaScript     |boundElements                                                 |
+----------------+--------------------------------------------------------------+



"event" JavaScript Objects

+----------------+--------------------------------------------------------------+
| JavaScript     |dataTransfer                                                  |
+----------------+--------------------------------------------------------------+



"event" JavaScript Properties

+----------------+--------------------------------------------------------------+
| JavaScript     |altKey                          altLeft                       |
| Properties     |button                          cancelBubble                  |
|                |clientX                         clientY                       |
|                |contentOverflow                 ctrlKey                       |
|                |ctrlLeft                        dataFld                       |
|                |fromElement                     height                        |
|                |keyCode                         layerX                        |
|                |layerY                          nextPage                      |
|                |offsetX                         offsetY                       |
|                |pageX                           pageY                         |
|                |propertyName                    qualifier                     |
|                |reason                          recordset                     |
|                |repeat                          returnValue                   |
|                |saveType                        screenX                       |
|                |screenY                         shiftKey                      |
|                |shiftLeft                       srcElement                    |
|                |srcFilter                       srcUrn                        |
|                |target                          toElement                     |
|                |type                            wheelDelta                    |
|                |width                           x                             |
|                |y                                                             |
+----------------+--------------------------------------------------------------+



"event" Syntax and Note

Note:
This object is created each time an event is fired with a set of properties 
that correspond to the fired event.
    
Syntax:
    
window.event.memberName