当前位置:网站首页>1. Mobile terminal touch screen event
1. Mobile terminal touch screen event
2022-07-01 04:15:00 【superfortunate】
touch Object represents a touch point . The touch point could be a finger , It could be a stylus . Touch screen events respond to user fingers ( Or a stylus ) Operation of the screen or touch pad .
| touchstart | Fingers touch a DOM Element trigger |
| touchmove | Finger in a DOM Triggered when sliding on an element |
| touchmove | Fingers from a DOM Triggered when the element is moved up |
var div = document.querySelector('div');
div.addEventListener('touchstart',function(){
console.log(' Touched ');
})TouchEvent It's a class that describes a finger on a touch plane ( Touch screen 、 Touchpad, etc ) The state of change of events . This type of event is used to describe one or more contacts , Enables developers to detect the movement of contacts , The increase and decrease of contacts , wait
touchstart、touchmove、touchmove Each has its own event object .
Three common object lists
| touches | A list of all fingers touching the screen |
| targetTouches | Touching the current DOM A list of fingers on the element |
| changedTouches | List of finger states that have changed , From scratch , From have to no |
div.addEventListener('touchstart',function(e){
console.log(e);
})
console.log(e.targetTouches[0]);// You can get what you are touching dom Information about the first finger of the element , Such as finger coordinates Happy study !
边栏推荐
- 采购数智化爆发在即,支出宝'3+2'体系助力企业打造核心竞争优势
- Web components series (VIII) -- custom component style settings
- 25.k sets of flipped linked lists
- Quickly filter data such as clock in time and date: Excel filter to find whether a certain time point is within a certain time period
- Jenkins自动清理构建历史
- Jenkins automatically cleans up construction history
- [TA frost wolf \u may- hundred people plan] 1.2.1 vector basis
- NFT:使用 EIP-2981 开启 NFT 版税之旅
- What does ft mean in the data book table
- Task04 | statistiques mathématiques
猜你喜欢

Possible problems and solutions of using scroll view to implement slider view

采购数智化爆发在即,支出宝'3+2'体系助力企业打造核心竞争优势

Mallbook: how can hotel enterprises break the situation in the post epidemic era?

Network metering - application layer

283.移动零

NFT:使用 EIP-2981 开启 NFT 版税之旅

Why can't you find the corresponding function by clicking go to definiton (super easy has a diagram)

【TA-霜狼_may-《百人计划》】1.1 渲染流水线

Account sharing technology enables the farmers' market and reshapes the efficiency of transaction management services

【深度学习】(4) Transformer 中的 Decoder 机制,附Pytorch完整代码
随机推荐
Network metering - application layer
JMeter login failure, extracting login token, and obtaining token problem solving
Task04 mathematical statistics
为什么香港服务器最适合海外建站使用
小程序中自定义组件
Jenkins自动清理构建历史
Codeforces Round #721 (Div. 2)B1. Palindrome Game (easy version)B2. Palindrome game (hard version)
OSPF notes [multiple access, two multicast addresses with OSPF]
Tip of edge browser: enter+ctrl can automatically convert the address bar into a web address
【TA-霜狼_may-《百人計劃》】1.2.1 向量基礎
【发送邮件报错】535 Error:authentication failed
Use winmtr software to simply analyze, track and detect network routing
25.k sets of flipped linked lists
ThreeJS开篇
One job hopping up 8K, three times in five years
The programmer's girlfriend gave me a fatigue driving test
What are permissions? What are roles? What are users?
【TA-霜狼_may-《百人计划》】1.2.3 MVP矩阵运算
NFT:使用 EIP-2981 開啟 NFT 版稅之旅
嵌入式系统开发笔记79:为什么要获取本机网卡IP地址