[ 来源:http://www.it55.com | 作者: | 时间:2007-11-04 | 收藏 | 推荐 ] 【大 中 小】
javascript实现页面刷新一定次数后自动跳转
<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://www.it55.com"
}
alert("You have refreshed "+ window.name+' time(s)');
}
</script>
(编辑:IT资讯之家 www.it55.com)