Detailed parsing of jswindow. event object _ javascript skills
Source: Internet
Author: User
Recently, due to work needs, I have been working on js for many days. When my wife asked me about ajax and asked me about js, she was not interested, I feel good about myself. After all, I have a sense of accomplishment when I make something. Here I will post some useful but uncommon things for your reference. event Represents the event status, for example, the element that triggers the event object, the location and status of the mouse, and the key that is pressed.
The event object is valid only when an event occurs.
Some Properties of the event only make sense for specific events. For example, the fromElement and toElement attributes only make sense for onmouseover and onmouseout events.
Example
The following example checks whether the mouse is clicked on the link. If the shift key is pressed, the link jump will be canceled.
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.