当前位置:网站首页>Description of event object
Description of event object
2022-06-30 09:56:00 【zimingyo】
Event object
Get event object
Event object : It's also an object , This object contains the relevant information when the event is triggered
The location of the event object : The first parameter of the callback function bound to the event is the event object
Elements .addEventListener('click',function(e){
})
Common properties of event objects
Some common properties
- type Get the current event type
- clientX/clientY Gets the position of the cursor relative to the upper left corner of the browser visible window
- offsetX/offsetY Gets the cursor relative to the current DOM The position of the upper left corner of the element
- key The value of the keyboard key pressed by the user ; The use of keyCode
- pageX/pageY Equivalent to page window
<body>
<script> document.addEventListener('click',function(e) {
console.log(e.type) console.log(e.clientX,e.clientY) console.log(e.offsetX,e.offsetY) console.log(e.pageX,e.pageY) }) </script>
</body>
边栏推荐
- Difference between bow and cbow
- 机械臂速成小指南(五):末端执行器
- Shenhe thermomagnetic: Super fusion dual active cluster solution for MES system
- Flume learning 1
- [new book recommendation] cleaning data for effective data science
- Design of mfc+mysql document data management system based on VS2010
- Hospital integration platform super fusion infrastructure transformation scheme
- MySQL optimization
- Application exploration and practice of super convergence in the production environment of insurance industry
- Flutter 中的 ValueNotifier 和 ValueListenableBuilder
猜你喜欢
![[new book recommendation] cleaning data for effective data science](/img/42/1258694fc55a178a666391669a67ad.png)
[new book recommendation] cleaning data for effective data science

oracle跨数据库复制数据表-dblink

NTP of Prometheus monitoring_ exporter

抽象类和接口

The present situation and challenge of the infrastructure of Yiwen parsing database

About the smart platform solution for business hall Terminal Desktop System

Notes on masking and padding in tensorflow keras

Comparison problems encountered in recent study

机器学习笔记 九:预测模型优化(防止欠拟合和过拟合问题发生)

【JVM】G1垃圾回收器简述
随机推荐
11. customize hooks
机器学习笔记 九:预测模型优化(防止欠拟合和过拟合问题发生)
Dart 开发技巧
2021-11-15
log4j
Datatabletomodellist entity class
Practice of super integration and transformation of core production business of public funds
Redis docker 主从模式与哨兵sentinel
Horrible bug records
【Ubuntu-redis安装】
【新书推荐】MongoDB Performance Tuning
MySQL index and data storage structure foundation
3. integrate eslint and prettier
7.手机登陆功能开发
How to build an all-in-one database cloud machine that meets the needs of information innovation?
近期学习遇到的比较问题
正则表达式基础
Theme Studio(主题工作室)
Installing Oracle database process in windows2007 on VM
【JVM】CMS简述