var maxTime = 5; // seconds
var time = maxTime;
$('body').on('keydown mousemove mousedown', function(e){
time = maxTime; // reset
});
var intervalId = setInterval(function(){
time--;
if(time <= 0) {
ShowInvalidLoginMessage();
clearInterval(intervalId);
}
}, 1000)
function ShowInvalidLoginMessage(){
window.location.href="http://www.baidu.com";
}
function reload1(){
time = maxTime; // reset**加粗样式**
}
js When page at a certain time after the operation did not jump page
Guess you like
Origin blog.csdn.net/ZQ960214/article/details/83451634
Recommended
Ranking