javascript - Internet Explorer 11 是否支持多点触控?

标签 javascript html multi-touch internet-explorer-11

我正在开发一个在 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/

相关文章:

html - Bootstrap Navbar 卡在移动设备上

html - TD 内容上的 CSS 选择器

html - 导航栏上的奇怪跳跃

javascript - 使用 D3.js 和 TUIO 的触摸事件

android - 在android中禁用多点触控

ios - 在 SKScene/Sprite Kit 中关闭同时触摸

javascript - JQuery Tablesorter 添加带有过滤器的列

javascript - 谁能让我明白代码在 vue.js 中的含义

javascript - 使用 GET 提交表单时不要在查询字符串中包含隐藏字段

javascript - 在 React 中,如何在条件语句中拥有动态变量名?