日常笔记--触屏事件的使用


var div=document.getElementById('div');

div.addEventListener('touchstart'搜索,function(e){

//touchstart:触摸开始的一瞬间,这里的e包含的触摸一瞬间所触摸的元素的信息

});

div.addEventListener('touchmove',function(e){

//touchmove:触摸进行时,这里的e包含的触摸的元素信息

});

div.addEventListener('touchend',function(e){

//touchend:触摸结束的一瞬间,这里的e没有多大的作用

});
posted @ 2022-12-06 22:22  轻风细雨_林木木  阅读(12)  评论(0编辑  收藏  举报