我正在开发一个在 Chrome 和 Firefox 中运行良好的多点触控绘图应用程序,但我无法从 Microsoft 获得任何关于是否是多点触控的直接答案(即:事件.touches) 在 Internet Explorer 11 中受支持。
现在在其他浏览器中工作的代码片段如下:
window.addEventListener("touchstart", onTouchStart, true);
function onTouchStart(event) {
console.log(event.touches.length);
}
在 chrome 中它会打印出触摸次数,但我在 Internet Explorer 中什么也得不到。如果有人知道这是否是 IE 的问题,我将不胜感激。
谢谢。
最佳答案
IE 有不同的方法:W3C Pointer Events http://msdn.microsoft.com/en-us/library/ie/dn433244.aspx
附注:如果您只是想测试多点触控支持,请使用 navigator.msMaxTouchPoints
。
if (navigator.msMaxTouchPoints > 1) { ... }
关于javascript - Internet Explorer 11 是否支持多点触控?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24251186/