Html+JS实现跳转
可以实现倒计时跳转的过程
<!DOCTYPE html>
<html>
<head>
<meta content="zh-CN" http-equiv="Content-Language">
<meta CONTENT="text/html; charset=gb2312" HTTP-EQUIV="Content-Type">
<title>Insert title here</title>
<script type="text/javascript">
window.onload = function(){
var time = 5;
var secondEle = document.getElementById("second");
var timer = setInterval(function(){
secondEle.innerHTML = time;
time--;
if(time==0){
clearInterval(timer);
location.href="http://www.baidu.com";
}
},1000);
}
</script>
</head>
<body>
恭喜你,注册成功,<span style="color:red" id="second">5</span>秒钟后跳转,如不跳转点击<a href="http://www.baidu.com">这里</a>!
</body>
Html实现跳转
<html>-
<head>
<meta content="zh-CN" http-equiv="Content-Language">
<meta CONTENT="text/html; charset=gb2312" HTTP-EQUIV="Content-Type">
<meta content="2;url=http://www.baidu.com" http-equiv="refresh">
</head>
<body>
</body>
</html>