admin管理员组文章数量:1391925
I am developing an application for Windows 8 (Metro UI). I am using HTML5, JavaScript, jQuery etc for development. I want to show a different user interface if the screen does not support screen touch events.
How can I detect if screen support touch sensitive in Windows 8 using JavaScript?
I am developing an application for Windows 8 (Metro UI). I am using HTML5, JavaScript, jQuery etc for development. I want to show a different user interface if the screen does not support screen touch events.
How can I detect if screen support touch sensitive in Windows 8 using JavaScript?
Share Improve this question edited Sep 15, 2012 at 11:53 MikkoP 5,09217 gold badges61 silver badges108 bronze badges asked Sep 15, 2012 at 11:41 AnoopAnoop 23.2k10 gold badges64 silver badges79 bronze badges1 Answer
Reset to default 8See here: Detecting Touch Hardware in IE 10
From the above page:
In order to test for touch in Internet Explorer 10, which will ship with the first batch of Windows 8 tablets later this year, you can call the window.navigator.msMaxTouchPoints method
if (window.navigator.msMaxTouchPoints) {
// touch device
}
else {
// non-touch device
}
本文标签: javascriptHow can I detect if a screen is touch sensitiveStack Overflow
版权声明:本文标题:javascript - How can I detect if a screen is touch sensitive? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744703975a2620728.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论