首页 > 解决方案 > 检测用户鼠标在浏览器内外的移动

问题描述

我想通过跟踪鼠标事件来检测用户是否不使用他的计算机?你知道如何使用 JQuery 或 Javascript 来实现这一点吗?

标签: javascriptjquery

解决方案


Not sure tracking mouse movements outside the browser is possible. You track this type of thing by using event listeners and mounting the listener to an html element. in your case you would mount a mousemove listener to the window to track movement across the whole page. But outside of the browser window their is nothing that JS can mount an event listener to their for leaving no option to track mouse movement outside the browser. (could be wrong though, seems creepy if its possible)


推荐阅读