touchEnd事件不触发解决办法

  移动端touchEnd事件不触发解决办法

<div id="dv" style="height:1000px"></div>
<script>
    document.addEventListener('touchstart', function (e) {
        e.preventDefault()//不增加这句touchend不会触发
    }, false);
    document.addEventListener('touchend', function (e) {
        document.getElementById('dv').innerHTML+='
touceend trigger'+new Date().getTime()
    }, false);
</script>

 

加支付宝好友偷能量挖...


原创文章,转载请注明出处:touchEnd事件不触发解决办法

评论(0)Web开发网
阅读(483)喜欢(1)JavaScript/Ajax开发技巧