Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我编写了 mousedown / mouseup 事件侦听器,它可以在我的 android 手机上工作,所以如果我只需要一个简单的触摸,我是否不需要为所有手机编写 touchstart 函数?
如果您的逻辑有效,为什么要更改它/添加更多事件处理程序?
我建议您阅读本文档以确定是否应该使用这些特定的处理程序。虽然它是 iOS 文档,但它可以让您很好地了解如何处理移动事件。
更多主题:
如果您只需要一个简单的触摸事件,在我看来,“点击”事件监听器就足够了。如果你想做任何滚动/鼠标(触摸?)特定的东西,再次:阅读该文档。