码迷,mamicode.com
首页 > 其他好文 > 详细

event.currentTarget

时间:2019-06-28 15:00:45      阅读:126      评论:0      收藏:0      [点我收藏+]

标签:orm   element   cli   target   res   rop   try   color   ati   

https://api.jquery.com/event.currentTarget/

event.currentTargetReturns: Element

Description: The current DOM element within the event bubbling phase.

  • version added: 1.3event.currentTarget

This property will typically be equal to the this of the function.

If you are using jQuery.proxy or another form of scope manipulation, this will be equal to whatever context you have provided, not event.currentTarget

Example:

Alert that currentTarget matches the `this` keyword.

$( "p" ).click(function( event ) {
  alert( event.currentTarget === this ); // true
});

 

 
 
 
 

event.currentTarget

标签:orm   element   cli   target   res   rop   try   color   ati   

原文地址:https://www.cnblogs.com/chucklu/p/11102325.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!