Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.arcetri.astro.it/irlab/doc/library/javascript/clientreference/event.htm
Дата изменения: Thu Oct 7 13:13:37 1999 Дата индексирования: Sat Dec 22 14:18:26 2007 Кодировка: Поисковые слова: zodiacal light |
event
object contains properties that describe a JavaScript event, and is passed as an argument to an event handler when the event occurs.event
object contains the type of event (in this case MouseDown), the x and y position of the cursor at the time of the event, a number representing the mouse button used, and a field containing the modifier keys (Control, Alt, Meta, or Shift) that were depressed at the time of the event. The properties used within the event
object vary from one type of event to another. This variation is provided in the descriptions of individual event handlers.
See Chapter 3, "Event Handlers," for complete information about event handlers. For more information on handling events, see the Client-Side JavaScript Guide.
event
objects are created by Communicator when an event occurs. You do not create them yourself.
UniversalBrowserWrite
privilege. In addition, getting the data
property of the DragDrop
event requires the UniversalBrowserRead
privilege. For information on security, see the Client-Side JavaScript Guide.
watch
and unwatch
methods from Object
.
<A HREF="http://home.netscape.com" onClick='alert("Link got an event: "The following example uses the event object in an explicitly called event handler.
+ event.type)'>Click for link event</A>
<SCRIPT>
function fun1(evnt) {
alert ("Document got an event: " + evnt.type);
alert ("x position is " + evnt.layerX);
alert ("y position is " + evnt.layerY);
if (evnt.modifiers & Event.ALT_MASK)
alert ("Alt key was down for event.");
return true;
}
document.onmousedown = fun1;
</SCRIPT>
UniversalBrowserWrite
privilege. In addition, getting this property for the DragDrop
event requires the UniversalBrowserRead
privilege. For information on security, see the Client-Side JavaScript Guide.
UniversalBrowserWrite
privilege. For information on security, see the Client-Side JavaScript Guide.
event.width
UniversalBrowserWrite
privilege. For information on security, see the Client-Side JavaScript Guide.
event.x
property.
event.layerY
UniversalBrowserWrite
privilege. For information on security, see the Client-Side JavaScript Guide.
event.y
property.
event.layerX
UniversalBrowserWrite
privilege. For information on security, see the Client-Side JavaScript Guide.
event.which
UniversalBrowserWrite
privilege. For information on security, see the Client-Side JavaScript Guide.
event.pageY
UniversalBrowserWrite
privilege. For information on security, see the Client-Side JavaScript Guide.
event.pageX
UniversalBrowserWrite
privilege. For information on security, see the Client-Side JavaScript Guide.
event.screenY
UniversalBrowserWrite
privilege. For information on security, see the Client-Side JavaScript Guide.
event.screenX
UniversalBrowserWrite
privilege. For information on security, see the Client-Side JavaScript Guide.
event.type
UniversalBrowserWrite
privilege. For information on security, see the Client-Side JavaScript Guide.
event.target
UniversalBrowserWrite
privilege. For information on security, see the Client-Side JavaScript Guide.
event.modifiers
UniversalBrowserWrite
privilege. For information on security, see the Client-Side JavaScript Guide.
event.height
UniversalBrowserWrite
privilege. For information on security, see the Client-Side JavaScript Guide.
event.layerX
property.
event.y
layerY
.UniversalBrowserWrite
privilege. For information on security, see the Client-Side JavaScript Guide.
event.layerY
property.
event.x
Last Updated: 05/28/99 11:59:24