标签:
<script> var count = 0; var outTime=30;//分钟 window.setInterval(go, 1000); function go() { count++; if (count == outTime*60) { alert("您因长时间未进行操作导致页面过期"); } } try { var x = event.clientX; var y = event.clientY; } catch (e) { } //监听鼠标 document.onmousemove = function () { var x1 = event.clientX; var y1 = event.clientY; if (x != x1 || y != y1) { count = 0; } x = x1; y = y1; }; //监听键盘 document.onkeydown = function () { count = 0; }; </script>
标签:
原文地址:http://www.cnblogs.com/sflik/p/5437096.html