当前位置:网站首页>event. target
event. target
2022-07-21 12:04:00 【sayyy】
About event object
In the function of the triggered event, we will receive a event object , Through this object, we need some parameters , For example, we need to know who this event has affected , You can go through event Properties of target To get to the .
function clickBtn(){
console.log("event is : ", event);
}
event.target
target Attributes specify which DOM Element triggers the event .
event.target // The target node of the event ( The node that triggered the event )
event.target.nodeName // Get the tag name of the event trigger element (li,p,div,img,button…)
event.target.id // Get event trigger elements id
event.target.className // Get event trigger elements classname
event.target.innerHTML // Get the content of the event trigger element (li)
function putOnTop(){
console.log("event.target is : ", event.target);
}
jquery:this And event.target difference :
this Blistering .event.target No bubble is triggered by the event dom.
边栏推荐
- 解道5-编程术2
- 线性回归模型笔记(2)
- What is skia?
- "Fundamentals of program design" Chapter 10 function and program structure 6-8 recursion for reverse order number (20 points)
- left join/inner join以后数据条数比原数据表多的原因及解决办法
- Help the AI industry landing, yunzhisheng shows the full stack of AI hard core technology
- 2021-9-18
- go学习笔记(一)
- Execution failed for task 'encountered using room': app:kaptdebugkotlin‘
- getSubmittedFileName()方法不可用问题
猜你喜欢
Shandong University, Beijing post, Harbin Institute of technology | multimodal dialog systems with dual knowledge enhanced generic trained language model
2021-9-18
WPS前骨干历时10年打造新型软件,Excel用户:我为此改用WPS
Could not resolve all dependencies for configuration
Introduction to chrome plug-in development -- CSDN login free copy, attention free view
BCG 使用之CBCGPTreeCtrlEx控件
c语言初学者对puts()的问题
sqlilabs less-25~25a
让软件开发民主化的低代码
Selection bias induced spurious correlations in large language models
随机推荐
Low code that democratizes software development
Selection bias induced spurious correlations in large language models
期货开户云上面可以开户吗?在上面开户安全吗?
Leetcode breaks the 9W mark
2021-9-22
OREPA:阿里提出训练也很快的重参数策略,内存减半,速度加倍 | CVPR 2022
What is skia?
2021-09-17
创建型模式之原型模式
Simulated exhaustive 731 My schedule II
MySQL realizes master-slave synchronization and master-master synchronization based on binlog
Distributed high concurrency and high availability fastdfs file server cluster deployment
【问题解决】 怎么传输文件到win服务器
2018全球半导体技术发明专利排行榜:京东方杀入前三,华为仅排第59位!
[problem solving] how to transfer files to win server
BCG 使用之CBCGPTreeCtrlEx控件
Django查询出MySQL数据库的QuerySet 对象数据 转化成 json 字符串
sqlilabs less-25~25a
mysql数据库 if buf[0] == 251: # \xfb IndexError: bytearray index out of range
让软件开发民主化的低代码