jQuery event.currentTarget 属性
jQuery 教程
· 2019-03-10 21:58:45
实例
event.currentTarget 通常等于 this:
$("h1,h2,p").click(function(event){
alert(event.currentTarget === this);
});
alert(event.currentTarget === this);
});
定义和用法
event.currentTarget 属性是在事件冒泡阶段内的当前 DOM 元素,通常等于 this。
语法
event.currentTarget
| 参数 | 描述 |
|---|---|
| event | 必需。event 参数来自事件绑定函数。 |
点击查看所有 jQuery 教程 文章: https://codercto.com/courses/l/35.html
The C Programming Language
Brian W. Kernighan、Dennis M. Ritchie / Prentice Hall / 1988-4-1 / USD 67.00
Presents a complete guide to ANSI standard C language programming. Written by the developers of C, this new version helps readers keep up with the finalized ANSI standard for C while showing how to ta......一起来看看 《The C Programming Language》 这本书的介绍吧!
JS 压缩/解压工具
在线压缩/解压 JS 代码
HEX CMYK 转换工具
HEX CMYK 互转工具