1.event.currenttarget//the current DOM element in the event bubbling phase$ ("P"). Click (Function (event) { alert (event.currenttarget = = = this);//True }); 2.event.data//the currently executing processor is bound, contains optional data to
Post it for your reference:
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
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 sense
Description
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 object ①, handle g_hevent; define a handle type variable ②, g_hevent = createevent (null, false, false, "tickets "); the createevent function creates an event object ③ and setevent (g_hevent). After the creation is complete, use the setevent
Usually we get the event object generally written 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 is automatically passed to the
Usually for compatibility with IE and Firefox, the general event handling method is:
Copy Code code as follows:
Btn.onclick=handle_btn_click;
function Handle_btn_click (evt) {
if (evt==null) evt=window.event;//ie
Handle the
The event object is an object that the DOM provides more detailed information about the event, which is often used when defining event handlers, and in order to ensure that we get an event object that is not NULL, we need to first confirm that:1 if (
Addevent (Odiv, "click",function(event) {Console.log (Event.bubbles+ "Event is bubbling"); Console.log (event.cancelable+ "Can I cancel the default behavior") Console.log (event.defaultprevented+ "DOM3 added, have you already called preventdefault ()
In jquery, the event that eventually passed in to the handler has been normalized by jquery,Its original event object is stored in the Originalevent attribute of the event object,Each event is an instance of Jquery.eventThere are six methods stored
Describes the status of an event, such as the element that triggers the event object, the location and status of the mouse, and the key that you press. The event object is valid only when an event occurs. Some Properties of the event only make sense
JavaScript Event ObjectLearning Essentials:1. Event Object2. Mouse events3. Keyboard events4.W3C and IEAn important aspect of JavaScript events is that they have some relatively consistent features that can provide more powerful functionality for
NetEase 2017 inside Push pen questionRequirements:Implement the interface for the following custom events event object, see Comments (Test 1)The interface of the event object needs to be extended by other objects (test 2)1 //Test 12Event.on ('
41, CurrenttargetThe current DOM element in the event bubbling phase equals this2. DataWhen the currently executing processor is bound, contains optional data to pass to the JQuery.fn.bind$ ("a"). each (function (i) {$ (the). bind (' click ', {index:
JS's Event object event property and method:1. Type: Types of events, such as Click in Onlick;2. Srcelement/target: The event source is the element in which the event occurred;3. Button: Declaration is pressed mouse button, integer, 1 for the left, 2
In all kernel objects, the event kernel object is the most basic object. Event to notify that an operation has been completed.Client and a server that need to communicate with each other example (VS2008)The composition of the event kernel objectA
Learning Essentials:
Event Object
Bubbling and blocking default behavior
First, the event objectIn JS, we have discussed in detail the JS event object, here to pick a few common discussiondiv
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
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.