笑看风云

一切从头开始
posts - 28, comments - 1, trackbacks - 0, articles - 2

10秒后实现页面自动跳转

Posted on 2008-07-10 13:43 笑看风云 阅读(3136) 评论(0)  编辑  收藏 所属分类: javascript
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  
<head>
    
<title>系统出错</title>
    
    
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    
<meta http-equiv="description" content="this is my page">
    
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
    
    
<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
<!--脚本开始-->
<script language=javascript>
function countDown(secs,surl){
 tiao.innerText
=secs;
 
if(--secs>0){
     setTimeout(
"countDown("+secs+",'"+surl+"')",1000);
 }
else{   window.open(surl,'_parent'); } 
}
</script>
<!--脚本结束--> 
  
</head>
  
  
<body>
   
<h3> 系统已拦截了您的非法操作,请返回首页;如果该问题重复出现,请联系系统管理员。</h3><br>
<br><span id="tiao"><b>10</b></span>秒后自动跳转到首页。<script language=javascript>countDown(10,'http://www.sina.com');</script>
<a href="http://www.baidu.com" target="_parent">如果您的浏览器没有自动跳转,请点击这里</a>
  
</body>
</html>
使用target主要是防止页面内嵌以后,仍然能够跳出来,不要内嵌到当前页里.

只有注册用户登录后才能发表评论。


网站导航: