本文介绍了页面自动刷新并注销的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
当我登录到站点并使主页空闲一分钟以上时,该页面会自动刷新并注销.
任何人都可以对此提出建议.
在此先感谢.
问候,
Bala.
Hi All,
When i login to a site and keep the home page idle for more than one minute, the page gets automatically refreshed and got logged out.
Can anyone suggest on this.
Thanks in Advance.
Regards,
Bala.
推荐答案
var SpanTime = 0
window.onload = function()
{
setTimeout(CheckIdle, 1000); // Every second call the method CheckIdle()
}
function CheckIdle()
{
if(SpanTime <= 60)
SpanTime++;
else
window.location = ''logout.aspx'';
}
希望能有所帮助:)
Hope that help :)
这篇关于页面自动刷新并注销的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!