Now the project has a requirement. On the PC page, if the user is idle for 3 minutes (for example, without moving, clicking the mouse, or pressing the keyboard), a corresponding prompt box will pop up.
为情所困2017-05-19 10:44:16
ifvisible.js
You can try this plug-in, which is specially used to monitor whether the user is idle or active, and you can set the idle time.
怪我咯2017-05-19 10:44:16
Use setTimeout, dom to monitor events, if there is an action, clear the timer, and then redefine the timer