用jQuery制作简单的注册成功后的跳转页面
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="/WEB03/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
function jump(count){
window.setTimeout(function(){
count--;
if(count>0){
$("#second").html(count);
jump(count);
}else{
location.href="https://www.baidu.com";
}
},1000);
}
jump(5);
});
</script>
<title>Insert title here</title>
</head>
<body>
恭喜你注册成功!
<span id="second" style="color:red">5</span>
秒内自动跳转,如不跳转请点击
<a href="https://www.baidu.com">这里</a>
</body>
</html>