Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
带有触摸屏的平板电脑和笔记本电脑具有“触摸”支持。那么我们如何在 javascript 的帮助下检测它是笔记本电脑而不是平板电脑呢?
PS:我不需要检测触摸设备。我需要区分带触摸屏的笔记本电脑和平板电脑。
var isLaptopWithTouchScreen; window.addEventListener('mousemove', function(){ isLaptopWithTouchScreen = true; });