当前位置:网站首页>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>
边栏推荐
- utlis 内存池 对象池
- Framework program of browser self-service terminal based on IE kernel
- Mysql database learning 1
- 2021-07-26
- Redis docker 主从模式与哨兵sentinel
- Object detection yolov5 open source project debugging
- 7.手机登陆功能开发
- 目标检测yolov5开源项目调试
- qmlplugindump executable not found. It is required to generate the qmltypes file for VTK Qml
- 3.集成eslint、prettier
猜你喜欢

Appium自动化测试基础 — 12.APPium自动化测试框架介绍

Shenhe thermomagnetic: Super fusion dual active cluster solution for MES system

NER – Named Entity Recognition Summary

9.缓存优化

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

机械臂速成小指南(五):末端执行器

Brève description du collecteur d'ordures G1

How to reduce the delay in live broadcast in the development of live broadcast source code with goods?
![[new book recommendation] cleaning data for effective data science](/img/42/1258694fc55a178a666391669a67ad.png)
[new book recommendation] cleaning data for effective data science

Forrester senior analyst: five important trends in the development of the hyper convergence market
随机推荐
事件委托的使用与说明》
Practice of super integration and transformation of core production business of public funds
Network based dynamic routing protocol (OSPF)
【ARK UI】HarmonyOS ETS的启动页的实现
安装和使用
Utils collaboration
ABAP time function
Eight sorts (I)
How to build an all-in-one database cloud machine that meets the needs of information innovation?
栈题目:字符串解码
一些国内镜像源
事件流的说明》
浏览器复制的网址粘贴到文档是超链接
JVM memory common parameter configuration set
What is the difference between ZigBee, Bluetooth and WiFi (copy and reprint)
抽象类和接口
Eight sorts (II)
Self service terminal development process
Network based BGP
关于字符串的split和join操作