简体   繁体   English

网页中的Windows触摸事件

[英]Windows touch events in web page

I'm trying to figure out how to add event listeners for windows touch events (like a big touch screen monitor, not mobile) in Windows 7 and can't seem to make things like touchstart touchend etc. trigger in any browser. 我试图弄清楚如何在Windows 7中为Windows触摸事件(例如大触摸屏显示器,而不是移动设备)添加事件侦听器,并且似乎无法在任何浏览器中触发touchstart touchend等事情。 Do these events just not fire in a browser like they do on an iPad? 这些事件是否不会像在iPad上那样在浏览器中触发?

看一下Hammer.js的v2分支http://eightmedia.github.com/hammer.js/v2/ ,它是适用于iOS,Android,BlackBerry的不错的触摸事件抽象层,还支持Windows触摸事件。

As far as I know, those events are included only in some mobile navigators (not all, see http://www.quirksmode.org/mobile/tableTouch.html ). 据我所知,这些事件仅包含在某些移动导航器中(并非全部,请参阅http://www.quirksmode.org/mobile/tableTouch.html )。 I don't think you can handle them on a standard browser like ff/ie/chrome. 我认为您无法在ff / ie / chrome之类的标准浏览器上处理它们。 You'll have to use mousedown & cie. 您必须使用mousedown和cie。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM