我将 mouseover 和 touchstart 事件附加到一个元素。我希望仅当用户使用鼠标时才发生鼠标悬停,并且仅当用户在触摸屏上点击鼠标时才发生触摸启动。在 IE 中,我使用 pointerdown
事件,但这捕获了它们。还有 MSGestureStart
可以检测 touchstart,但 mouseover 仍然会触发。如何在 IE 中区分 mousehover
和 tocuhstart
?
最佳答案
关于javascript - 如何在 IE 中仅检测鼠标悬停而不检测 touchstart?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21181286/