event.currentTarget
Posted chucklu
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了event.currentTarget相关的知识,希望对你有一定的参考价值。
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的主要内容,如果未能解决你的问题,请参考以下文章