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.
如何检测用户是否在使用触摸屏?这可以在 Python/Django 或 javascript 中。
function is_touch_device() { return !!('ontouchstart' in window) || !!('onmsgesturechange' in window); };