刷新页面一定次数后自动 转到登录界面
<
script
>
if(window.name==""){
window.name = "0";
}
else{
window.name = eval(window.name) + 1;
if(window.name=="5") //刷新页面次数>5
{
alert("You have refreshed 5 times. Please relogin");
location.href = "http://bbs.51js.com/"
}
alert("You have refreshed "+ window.name+' time(s)');
}
</ script >
if(window.name==""){
window.name = "0";
}
else{
window.name = eval(window.name) + 1;
if(window.name=="5") //刷新页面次数>5
{
alert("You have refreshed 5 times. Please relogin");
location.href = "http://bbs.51js.com/"
}
alert("You have refreshed "+ window.name+' time(s)');
}
</ script >