When triggering an event on the DOM, an event object is generated, which records Some information about the event. Regardless of whether the event binding is DOM0-level or DOM2-level, the event object is passed in, and when a handler is specified
Jquery.event Wrapper Event Object
Due to the differences of native event objects in different browsers, most JS libraries/frames have been repaired and packaged for native event objects.
For example, stop event bubbling ie with cancelbubble,
When an event is triggered in JS, an event object is generated, that is, the events in the function handler, through which we can access all the information related to the event, such as the type of event, the event object, and so on. It is
Event is an important event in Javascript. It represents the event status and is responsible for event processing. Its Attributes and methods can help us complete many operations that interact with users, the following is a brief summary of this
Html dom Event object instance
Which mouse button is clicked?
What is the coordinate of the cursor?
What is the unicode of the pressed key?
What is the coordinate of the cursor relative to the screen?
Is the shift key pressed?
Which element is
Original: http://www.cnblogs.com/songyaqi/p/5204143.html
In the function that triggers the event, we receive an event object, through which we need some parameters, for example, if we need to know who the event is for, we can get it through
Event indicates the Event status, such as the Event element, keyboard status, mouse position, and mouse button status. Once an Event occurs, an event object is generated. If you click a button, the corresponding Event object is generated in the
Click events in various mainstream browsers to facilitate queries during use. The sorting is very detailed. If you are interested, refer to it. I hope this article will help you.
IE
The left button is window. event. button = 1.
Right-click window.
Event object Xiang Jie
Event indicates the event status, such as the element that triggers the event object, the location and status of the mouse, and the key to be pressed.
The event object is valid only when an event occurs.
Some Properties
It is said that event (event object) is the most primitive synchronization method of multithreading, and I think it is the most flexible one.The event object (the handle table) mainly contains two Boolean variables. You can see from its creation
When an event on the DOM is triggered, an event object is generated.
Event objects in the DOM
A browser that is compatible with the DOM passes an event object to the event handler. The event object contains the properties and methods associated
Usually we get the event object generally written as follows:
Copy Code code as follows:
function GetEvent (event) {
Return Event | | Window.event//IE:window.event
}
If there are no arguments, it can be written (non ie:
The Event object represents the Event status, such as the elements in the Event, the status of the keyboard buttons, the location of the mouse, and the status of the mouse button. The method to obtain the Event object is as follows, if you are
Mouse events are the most common type of event on the Web, after all, the mouse is still the most important positioning device. Then through the event object can get to the mouse button information and screen coordinate acquisition and so on.One,
Event indicates the event status, such as the element that triggers the event object, the location and status of the mouse, and the key to be pressed.
The event object is valid only when an event occurs.
Some Properties of the event only make
Http://mysticnomad.wordpress.com/2008/03/21/difference-between-eventtarget-and-eventcurrenttarget-properties-in-an-event-object/
In Flex, an event object is created whenever an event is dispatched. The event object has two important
Event Represents the status of an event and is responsible for event processing. Its Attributes and methods can help us complete many operations that interact with users;
I. main attributes and methods of event objects1. Type:The event type is the
DescribeAn event represents the state of an incident, such as the element that triggered the object, the position and state of the mouse, the key pressed, and so on.The event object is only valid during the events.Some properties of an event are
Event object: The instant the event occurs, the location, the time, the mouse button, the node that is triggered, and so on, is packaged into an object that the system automatically passes to the first parameter of the event function."Example"
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.