TypechoJoeTheme

至尊技术网

统计
登录
用户名
密码
/
注册
用户名
邮箱

微信小程序长按事件

2022-07-15
/
0 评论
/
826 阅读
/
正在检测是否收录...
07/15


<view bindtouchstart="touchstart" bindtouchend="touchend">123456</view>

//touch start
touchstart: function(e) {    
    this.startTime = e.timeStamp;
    console.log(this.startTime)   
},  

//touch end 
touchend: function(e) {    
    this.endTime = e.timeStamp;   
    console.log(this.endTime)     
    console.log("endTime - startTime = " + (this.endTime-this.startTime)); 
    if (this.endTime - this.startTime>600){      
    console.log('长按')   
    }  
}

微信小程序经验长按事件
朗读
赞(1)
版权属于:

至尊技术网

本文链接:

https://www.zzwws.cn/archives/6347/(转载时请注明本文出处及文章链接)

评论 (0)

人生倒计时

今日已经过去小时
这周已经过去
本月已经过去
今年已经过去个月

最新回复

  1. 强强强
    2025-04-07
  2. jesse
    2025-01-16
  3. sowxkkxwwk
    2024-11-20
  4. zpzscldkea
    2024-11-20
  5. bruvoaaiju
    2024-11-14

标签云