touchstart:手指按下事件,类似 mousedown
    touchmove:手指移动事件,类似 mousemove
    touchend:手指抬起事件,类似 mouseup
    注意:移动端事件最好用事件监听函数来添加,不要用on添加

    1. box.addEventListener('touchstart',()=>{
    2. console.log('手指按下去了');
    3. });
    4. box.addEventListener('touchmove',()=>{
    5. console.log('手指滑动了');
    6. });
    7. box.addEventListener('touchend',()=>{
    8. console.log('手指抬起了');
    9. });