IE10是否支持触摸事件? [英] Will/Does IE10 Support Touch Events?
问题描述
p> 更新:触摸事件是 在开发中 在Internet Explorer中。
虽然IE10不支持 touchstart 和 touchend 类型的事件,它将支持一个可以说是由指针组成的优秀模型。这些通用指针捕获笔,鼠标和手指的输入。在 触摸2011年9月的IE10和Metro样式应用程序的输入。
您应该可以使用较老的触摸模式,使用MSPointer模型,只需轻轻点击功能检测和智能脚本:
var elm = document.getElementById(#foo),
evt = window.navigator.msPointerEnabled? MSPointerDown:touchstart;
elm.addEventListener(evt,handler,false);
更多关于指针和手势的事件可以在这里找到: http://msdn.microsoft.com/en-US/library/ie/hh673557.aspx
重要发展
- W3C已经形成了基于微软指针模型的工作组。
- Hand.js:在每个浏览器上支持指针事件的polyfill
I'm looking at doing a project that would target Internet Explorer 10 using a touch screen. I don't currently have a touch screen handy, but need to know if Internet Explorer 10 does or will support DOM touch events.
Update: Touch Events are in development in Internet Explorer.
While IE10 will not support the touchstart and touchend type of events, it will support an arguably superior model consisting of Pointers. These generic pointers capture input from pens, mice, and fingers. A great primer was given in the post Touch Input for IE10 and Metro style Apps, dated Sept, 2011.
You should be able to get the older touch model to work well with the MSPointer model with just abit of feature-detection and clever-scripting:
var elm = document.getElementById("#foo"),
evt = window.navigator.msPointerEnabled ? "MSPointerDown" : "touchstart";
elm.addEventListener(evt, handler, false);
More on Pointer and Gesture events can be found here: http://msdn.microsoft.com/en-US/library/ie/hh673557.aspx
Important Developments
- The W3C has formed a Working Group based on Microsoft's Pointer model.
- Hand.js: a polyfill for supporting pointer events on every browser
这篇关于IE10是否支持触摸事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!