M端事件
- 移动端也有自己独特的地方,比如触屏事件touch(也称触摸事件)
 - touch对象代表一个触摸点。触摸点可能是一根手指,也可能是一根触摸笔。触屏事件可响应用户手指(或触控笔)对屏幕或触控板操作。
 - 常见的触屏事件如下: 
  
touchstart:手指触摸到一个DOM元素时触发touchmove:手指在一个DOM元素上滑动时触发touchend:手指从一个DOM元素上移开时触发
 
示例:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            width: 200px;
            height: 200px;
            background-color: plum;
        }
    </style>
</head>
<body>
    <div class="box"></div>
    <script>
        const box = document.querySelector('.box')
        box.addEventListener('touchstart', function () {
            console.log('开始摸了')
        })
        box.addEventListener('touchend', function () {
            console.log('不摸了')
        })
        box.addEventListener('touchmove', function () {
            console.log('一直摸,移动')
        })
    </script>
</body>
</html>
                














![[机器学习]LFM梯度下降算法](https://img-blog.csdnimg.cn/direct/aa6c295d2beb4186bbe2ff5d40327929.png)



