更新时间:2023-09-28 23:06:40
我相信你是寻找这样的东西:
http://paulirish.com/2009 / jquery-idletimer-plugin /
I belive you are looking for something like this:
http://paulirish.com/2009/jquery-idletimer-plugin/
如果您自己编写代码,则需要捕获鼠标和键盘事件并重新启动计时器在任何这些事件之后。如果计时器达到阈值或从阈值倒计时到0,则可以重置页面的URL。
If you were to code that yourself, you would need to capture mouse and keyboard events and restart your timer after any of these events. If the timer ever reaches the threshold or counts down to 0 from the threshold you can reset the URL of the page.